diff options
author | Ilia Mirkin <[email protected]> | 2015-08-27 23:27:50 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-09-10 17:38:52 -0400 |
commit | 56238305e5474d749881006622c5ee65dee4fb40 (patch) | |
tree | d5bd1615a80e8dadf0d5baf01d246295706488b3 /src/glsl/nir/glsl_to_nir.cpp | |
parent | 37c5c862810ddf8f3973ec738aa0a2a33af3bcb2 (diff) |
nir: convert glsl imageSamples into a new intrinsic
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/nir/glsl_to_nir.cpp')
-rw-r--r-- | src/glsl/nir/glsl_to_nir.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp index bf78b4253d9..944f7462911 100644 --- a/src/glsl/nir/glsl_to_nir.cpp +++ b/src/glsl/nir/glsl_to_nir.cpp @@ -644,6 +644,8 @@ nir_visitor::visit(ir_call *ir) op = nir_intrinsic_memory_barrier; } else if (strcmp(ir->callee_name(), "__intrinsic_image_size") == 0) { op = nir_intrinsic_image_size; + } else if (strcmp(ir->callee_name(), "__intrinsic_image_samples") == 0) { + op = nir_intrinsic_image_samples; } else { unreachable("not reached"); } @@ -670,6 +672,7 @@ nir_visitor::visit(ir_call *ir) case nir_intrinsic_image_atomic_xor: case nir_intrinsic_image_atomic_exchange: case nir_intrinsic_image_atomic_comp_swap: + case nir_intrinsic_image_samples: case nir_intrinsic_image_size: { nir_ssa_undef_instr *instr_undef = nir_ssa_undef_instr_create(shader, 1); @@ -693,7 +696,8 @@ nir_visitor::visit(ir_call *ir) info->dest_components, NULL); } - if (op == nir_intrinsic_image_size) + if (op == nir_intrinsic_image_size || + op == nir_intrinsic_image_samples) break; /* Set the address argument, extending the coordinate vector to four |