summaryrefslogtreecommitdiffstats
path: root/src/intel/tools
diff options
context:
space:
mode:
authorNeil Roberts <[email protected]>2018-05-09 15:14:36 +0200
committerAlejandro Piñeiro <[email protected]>2018-07-10 11:43:40 +0200
commit45106a1c931d86060df72bcd296b4a1d33fda9bb (patch)
tree565fe01eb25b7bd7da9259d4795778588e97ea6d /src/intel/tools
parent18c086a9e641c1808be0416468c1d11913a3675c (diff)
spirv: Fix InterpolateAt* instructions for vecs with dynamic index
If the glsl is something like this: in vec4 some_input; interpolateAtCentroid(some_input[idx]) then it now gets generated as if it were: interpolateAtCentroid(some_input)[idx] This is necessary because the index will get generated as a series of nir_bcsel instructions so it would no longer be an input variable. It is similar to what is done for GLSL in ca63a5ed3e9efb2bd645b42. Although I can’t find anything explicit in the Vulkan specs to say this should be allowed, the SPIR-V spec just says “the operand interpolant must be a pointer to the Input Storage Class”, which I guess doesn’t rule out any type of pointer to an input. This was found using the spec/glsl-4.40/execution/fs-interpolateAt* Piglit tests with the ARB_gl_spirv branch. Signed-off-by: Neil Roberts <[email protected]> Signed-off-by: Alejandro Piñeiro <[email protected]> v2: update after nir_deref_instr land on master. Implemented by Alejandro Piñeiro. Special thanks to Jason Ekstrand for guidance at the new nir_deref_instr world. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/tools')
0 files changed, 0 insertions, 0 deletions