diff options
author | Dave Airlie <[email protected]> | 2017-01-31 05:19:56 +1000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-02-03 11:08:58 +0000 |
commit | eaf311d90d20c819e5fa8a9cb7dd781bdb257041 (patch) | |
tree | c42bb97421fd20e3d590202619595cff4b2c1052 /src/amd | |
parent | bbb4562def6e91e69b1613b1c8d72d4a125c7d45 (diff) |
radv/ac: implement txs for buffer textures.
This fixes a bunch of buffer related:
dEQP-VK.memory.pipeline_barrier.*
tests, that were crashing in LLVM due to this being missing.
Reviewed-by: Andres Rodriguez<[email protected]>
Cc: "17.0" <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit 0ecd426490b043aac6a5db0a6e0feaa39f6d9c54)
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 18e3c39f2f3..68c2972e5c0 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3218,6 +3218,11 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr) } } + if (instr->op == nir_texop_txs && instr->sampler_dim == GLSL_SAMPLER_DIM_BUF) { + result = get_buffer_size(ctx, res_ptr, false); + goto write_result; + } + if (instr->op == nir_texop_texture_samples) { LLVMValueRef res, samples, is_msaa; res = LLVMBuildBitCast(ctx->builder, res_ptr, ctx->v8i32, ""); |