diff options
author | Timothy Arceri <[email protected]> | 2019-01-22 11:48:51 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-01-23 10:41:37 +1100 |
commit | f0ed59076f7e6e2bf8c6f5d42b6a8e8aac57d3e2 (patch) | |
tree | 222abd94bd30281969f86bbbb05855571ecac459 /src/gallium/drivers/radeonsi/si_shader_nir.c | |
parent | 1ce5d757d04ab91423d757811c712ab098a35ccc (diff) |
radeonsi/nir: add missing piece for bindless image support
This fixes some piglit tests and is was TGSI does.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader_nir.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_nir.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 037376a22ef..7554f5b9f8b 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -939,6 +939,12 @@ si_nir_load_sampler_desc(struct ac_shader_abi *abi, /* dynamic_index is the bindless handle */ if (image) { + /* For simplicity, bindless image descriptors use fixed + * 16-dword slots for now. + */ + dynamic_index = LLVMBuildMul(ctx->ac.builder, dynamic_index, + LLVMConstInt(ctx->i32, 2, 0), ""); + return si_load_image_desc(ctx, list, dynamic_index, desc_type, dcc_off, true); } |