diff options
author | Jason Ekstrand <[email protected]> | 2019-02-27 15:59:29 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-03-25 16:12:09 -0500 |
commit | 8ed583fe5237038e7fd78d0635e8fb93322e96c7 (patch) | |
tree | 238398823f3b42f179a3bcedc1159c55e98c9804 /src/compiler/spirv/spirv_to_nir.c | |
parent | e50ab2c0f23c0c12dd8f50b5d3cecb811a332779 (diff) |
spirv: Handle the NonUniformEXT decoration
Diffstat (limited to 'src/compiler/spirv/spirv_to_nir.c')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 77f49b50563..8c2b995be8f 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -2407,6 +2407,12 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode, is_shadow && glsl_get_components(ret_type->type) == 1; instr->component = gather_component; + if (sampled.image && (sampled.image->access & ACCESS_NON_UNIFORM)) + instr->texture_non_uniform = true; + + if (sampled.sampler && (sampled.sampler->access & ACCESS_NON_UNIFORM)) + instr->sampler_non_uniform = true; + switch (glsl_get_sampler_result_type(image_type)) { case GLSL_TYPE_FLOAT: instr->dest_type = nir_type_float; break; case GLSL_TYPE_INT: instr->dest_type = nir_type_int; break; |