| Summary: | R200 crashes in glXMakeCurrent if GL_FRAGMENT_SHADER_ATI is enabled | ||
|---|---|---|---|
| Product: | Mesa | Reporter: | Stefan Dösinger <stefandoesinger> |
| Component: | Drivers/DRI/r200 | Assignee: | Default DRI bug account <dri-devel> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | medium | ||
| Version: | unspecified | ||
| Hardware: | x86 (IA32) | ||
| OS: | Linux (All) | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
| Attachments: | Test demonstrating the problem | ||
Hmm the driver can't handle an undefined shader, and we do state validation (why?) when a context is made current. Though I guess the same bug would happen if you'd just enable ATI_fragment_shader then try to render something without having the shader defined... Fixed in git (master and mesa_7_0_branch), just a bogus check if ATI_fs is really enabled (that is, a valid program is bound). I've left the validation code when doing makecurrent though for now, until I understand why it's there - I've no idea what would fail if it's removed... Wow, that was quick! I'll try to set up the git version of mesa to test if it works with my shiny new GL_ATI_fragment_shader wine code as well. Thanks, Stefan For what it's worth, I also see the same crash with 7.0.2 if I have a valid shader bound. So the problem is not the undefined shader. |
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.
Created attachment 15570 [details] Test demonstrating the problem When making a context current that had GL_FRAGMENT_SHADER_ATI enabled, possibly activated before the context was unset earlier, then Mesa crashes in r200UpdateFragmentShader in r200_dri.so. The attached test program illustrates this issue. The sample program creates and activates a GL context using glut, enables GL_FRAGMENT_SHADER_ATI, unsets the context and reactivates it. It can be compiled with "gcc fragshader.c -o fragshader -lGL -lglut". Possibly the GL_FRAGMENT_SHADER_ATI constant has to be defined if the OpenGL header does not do so. A workaround for this issue is to deactivate GL_FRAGMENT_SHADER_ATI before unsetting a context, so reactivating it works. Afterwards GL_FRAGMENT_SHADER_ATI can be safely reenabled. Existing fragment shaders work correctly afterwards, and sharing them via display list sharing works correctly as well. The Mesa version is 7.0.2 according to glxinfo, bugzilla won't let me select this version. The GL renderer string is "Mesa DRI R200 20060602 AGP 1x x86/MMX/SSE2 TCL"