| Summary: | Incorrect tokens emitted for texgen planes in emit_statevars, slang_builtin.c | ||
|---|---|---|---|
| Product: | Mesa | Reporter: | li.anye.0 |
| Component: | Mesa core | Assignee: | mesa-dev |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | medium | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
Fixed in git, commit f8dd6594bf1d597b883af44e5d724a181c1e2b53 Thanks for finding that! |
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.
If you write a shader that uses the texgen planes, you will get complaints about invalid state[0] or something like that. I haven't cooked up a simple example program to trip this up, but it should not be necessary, because there is obviously a problem with the code. In src/mesa/shader/slang/slang_builtin.c: In emit_statevar: else if (strcmp(name, "gl_EyePlaneS") == 0) { tokens[0] = STATE_TEXGEN_EYE_S; } ... else if (strcmp(name, "gl_ObjectPlaneQ") == 0) { tokens[0] = STATE_TEXGEN_OBJECT_Q; } This is inconsistent with _mesa_fetch_state in src/mesa/shader/prog_statevars.c. My guess (not being familiar with the code) is that it should be tokens[0] = STATE_TEXGEN; tokens[2] = STATE_TEXGEN_EYE_S; etc.