diff options
author | Timothy Arceri <[email protected]> | 2017-11-01 12:43:46 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-11-03 14:19:51 +1100 |
commit | 439a2febc4a658fdf38275268b6b5f566f3a3253 (patch) | |
tree | fed076b4259f582b9bb8de7fb202c3f161b5f51c /src/gallium/drivers | |
parent | 440d08fe932be89f56fc8ebec94c8393a6626369 (diff) |
ac/radeonsi: add support for tex instr without a derefence
These are produced by nir_lower_bitmap(), adding the missing derefence
would cause other issues that need to be hacked around such as
skipping sampler lowering and uniform location assignment, so this
change seems the correct way to go.
Fixes 194 piglit crashes on radeonsi using NIR.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_nir.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 7a882273812..32f6d86647a 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -59,6 +59,11 @@ static void scan_instruction(struct tgsi_shader_info *info, } else if (instr->type == nir_instr_type_tex) { nir_tex_instr *tex = nir_instr_as_tex(instr); + if (!tex->texture) { + info->samplers_declared |= + u_bit_consecutive(tex->sampler_index, 1); + } + switch (tex->op) { case nir_texop_tex: case nir_texop_txb: |