diff options
author | Rob Clark <[email protected]> | 2018-03-03 15:31:13 -0500 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2018-07-12 13:09:00 +0200 |
commit | 9ce0360f7623309ba756f189b8cdd16310a2355f (patch) | |
tree | f1eedadc8f841b34ff7a57f94de8e17343e88b18 /src | |
parent | f1b3f7bface5ddabad19db47f13393b6a7d5f2c8 (diff) |
nir/spirv: Use imov where we might have 8 bit types
Otherwise nir_validate may complain about 8 bit floats, which do not exist.
Reviewed-by: Karol Herbst <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Signed-off-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 80a35b1b750..aad4c713f9e 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -2798,7 +2798,7 @@ create_vec(struct vtn_builder *b, unsigned num_components, unsigned bit_size) { nir_op op; switch (num_components) { - case 1: op = nir_op_fmov; break; + case 1: op = nir_op_imov; break; case 2: op = nir_op_vec2; break; case 3: op = nir_op_vec3; break; case 4: op = nir_op_vec4; break; @@ -2847,7 +2847,7 @@ nir_ssa_def * vtn_vector_extract(struct vtn_builder *b, nir_ssa_def *src, unsigned index) { unsigned swiz[4] = { index }; - return nir_swizzle(&b->nb, src, swiz, 1, true); + return nir_swizzle(&b->nb, src, swiz, 1, false); } nir_ssa_def * |