diff options
author | Timothy Arceri <[email protected]> | 2018-01-18 18:15:28 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-01-23 18:05:13 +1100 |
commit | 82adf53308c137ce0dc5f2d5da4e7cc40c5b808c (patch) | |
tree | c0addfaa58a1c60d53875019be374c544921aa50 /src/amd/common | |
parent | a29d63ecf71546c4798c609e37810f0ec81793d8 (diff) |
ac: image size builtin for GLSL_SAMPLER_DIM_3D
This is what radeonsi does. Fixes remaing piglit subtest in:
./bin/arb_shader_image_size-builtin --quick -auto -fbo
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 214fb148a11..8ec361cf8db 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3814,7 +3814,8 @@ static LLVMValueRef visit_image_size(struct ac_nir_context *ctx, const nir_variable *var = instr->variables[0]->var; const struct glsl_type *type = instr->variables[0]->var->type; bool da = glsl_sampler_type_is_array(var->type) || - glsl_get_sampler_dim(var->type) == GLSL_SAMPLER_DIM_CUBE; + glsl_get_sampler_dim(var->type) == GLSL_SAMPLER_DIM_CUBE || + glsl_get_sampler_dim(var->type) == GLSL_SAMPLER_DIM_3D; if(instr->variables[0]->deref.child) type = instr->variables[0]->deref.child->type; |