Skip to content
Snippets Groups Projects
Commit 197a19f9 authored by Ilia Mirkin's avatar Ilia Mirkin
Browse files

mesa/prog: relative offsets into constbufs are not constant

The optimization logic relies on being able to read out constbuf values
from program parameters. However that only works if there's no relative
addressing involved.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91173


Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Reviewed-by: default avatarChris Forbes <chrisf@ijw.co.nz>
parent fe2b748a
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,8 @@ src_regs_are_constant(const struct prog_instruction *inst, unsigned num_srcs)
for (i = 0; i < num_srcs; i++) {
if (inst->SrcReg[i].File != PROGRAM_CONSTANT)
return false;
if (inst->SrcReg[i].RelAddr)
return false;
}
return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment