Bug 27570

Summary: r300g incorrectly claims npot support
Product: Mesa Reporter: Wiktor Janas <wixorpeek>
Component: Drivers/DRI/r300Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: the test program (compile with -std=c99)
the correct rendering
the r300g's rendering

Description Wiktor Janas 2010-04-09 13:47:39 UTC
Created attachment 34853 [details]
the test program (compile with -std=c99)

The r300g driver on rv515 claims GL_ARB_texture_non_power_of_two support. Suprisingly, such textures actually work if texture coordinates are (0,0), (1,0), (1,1), (0,1). However if that's not the case, garbage is rendered. This bug makes Blender 2.50 ui unusable. 

Attached are: test program, correct rendering (obtained by LIBGL_ALWAYS_SOFTWARE=1) and r300g's rendering (the garbage pattern varies, sometimes just white/black, sometimes all pixels are random).

driver is from git version, commit edb5253dfa0...
hardware is radeon x1300 (rv515)
kernel is vanilla 2.6.33.
Comment 1 Wiktor Janas 2010-04-09 13:48:05 UTC
Created attachment 34854 [details]
the correct rendering
Comment 2 Wiktor Janas 2010-04-09 13:48:27 UTC
Created attachment 34855 [details]
the r300g's rendering
Comment 3 Marek Olšák 2010-04-09 14:16:25 UTC
The NPOT textures are mandatory in GL2 and if the driver doesn't claim their support, Mesa will report OpenGL 1.5 only, pretty much killing the main selling point of r300g.

I plan to implement a fallback soon.
Comment 4 Marek Olšák 2010-05-08 07:50:19 UTC
Partial support for NPOT textures has been implemented in fragment shaders and your attached test program works now. Closing...

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.