diff options
author | Neil Roberts <[email protected]> | 2015-07-17 14:40:03 +0100 |
---|---|---|
committer | Neil Roberts <[email protected]> | 2015-10-09 15:13:40 +0200 |
commit | da361acd1c899d533caec6cae5a336f6ab35e076 (patch) | |
tree | 873fcdd7cfb8de28b6ee5562e2a2c0dbac08b363 /src/glsl/ir_basic_block.cpp | |
parent | 728d7bc85f1f101875349690bf1637037a5a1817 (diff) |
i965/fs: Handle non-const sample number in interpolateAtSample
If a non-const sample number is given to interpolateAtSample it will
now generate an indirect send message with the sample ID similar to
how non-const sampler array indexing works. Previously non-const
values were ignored and instead it ended up using a constant 0 value.
The generator will try to determine if the sample ID is dynamically
uniform via nir_src_is_dynamically_uniform. If not it will query the
pixel interpolator in a loop, once for each different live sample
number. The next live sample number is found using emit_uniformize. If
multiple live channels have the same sample number then they will be
handled in a single iteration of the loop. The loop is necessary
because the indirect send message doesn't seem to have a way to
specify a different value for each fragment.
This fixes the following two Piglit tests:
arb_gpu_shader5-interpolateAtSample-nonconst
arb_gpu_shader5-interpolateAtSample-dynamically-nonuniform
v2: Handle dynamically non-uniform sample ids.
v3: Remove the BREAK instruction and predicate the WHILE directly.
Make the tokens arrays const. (Matt Turner)
v4: Iterate over the live channels instead of each possible sample
number.
v5: Don't special case immediate values in
brw_pixel_interpolator_query. Make a better wrapper for the
function to set up the PI send instruction. Ensure that the SHL
instructions are scalar. (Francisco Jerez).
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/glsl/ir_basic_block.cpp')
0 files changed, 0 insertions, 0 deletions