radeonsi/nir: add missing piece for bindless image support

This fixes some piglit tests and is was TGSI does.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Timothy Arceri 2019-01-22 11:48:51 +11:00
parent 1ce5d757d0
commit f0ed59076f
1 changed files with 6 additions and 0 deletions

View File

@ -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);
}