mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
r300: clean fog_attr/wpos_attr if code accessing these attributes has been removed FP during compilation
This commit is contained in:
parent
516334b7ff
commit
70929f4505
1 changed files with 13 additions and 0 deletions
|
|
@ -256,6 +256,19 @@ static void translate_fragment_program(GLcontext *ctx, struct r300_fragment_prog
|
|||
|
||||
fp->InputsRead = compiler.Base.Program.InputsRead;
|
||||
|
||||
/* Clear the fog/wpos_attr if code accessing these
|
||||
* attributes has been removed during compilation
|
||||
*/
|
||||
if (fp->fog_attr != FRAG_ATTRIB_MAX) {
|
||||
if (!(fp->InputsRead & (1 << fp->fog_attr)))
|
||||
fp->fog_attr = FRAG_ATTRIB_MAX;
|
||||
}
|
||||
|
||||
if (fp->wpos_attr != FRAG_ATTRIB_MAX) {
|
||||
if (!(fp->InputsRead & (1 << fp->wpos_attr)))
|
||||
fp->wpos_attr = FRAG_ATTRIB_MAX;
|
||||
}
|
||||
|
||||
rc_destroy(&compiler.Base);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue