diff options
author | Jason Ekstrand <[email protected]> | 2017-09-01 22:37:42 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-11-07 10:37:52 -0800 |
commit | 103081c9a9912a11b47077b8e25efdbbb3d65e10 (patch) | |
tree | d23bbf7e605e0322650915059244a5a215f8365a /src/intel/compiler/brw_fs_nir.cpp | |
parent | ebaee9da4adaad10e1c46bdd2f5521175ea04044 (diff) |
intel/fs: Retype dest to match value in read[First]Invocation
This is what we really wanted all along. Always retyping to D works
because that's what get_nir_src() always gives us, at least for 32-bit
types. The SPIR-V variants of these operations accept arbitrary types
and we need this if we're going to handle 64 or 16-bit values.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_fs_nir.cpp')
-rw-r--r-- | src/intel/compiler/brw_fs_nir.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 201a23f83bd..628d7b00c54 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -4307,15 +4307,13 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr bld.exec_all().emit(SHADER_OPCODE_BROADCAST, tmp, value, bld.emit_uniformize(invocation)); - bld.MOV(retype(dest, BRW_REGISTER_TYPE_D), - fs_reg(component(tmp, 0))); + bld.MOV(retype(dest, value.type), fs_reg(component(tmp, 0))); break; } case nir_intrinsic_read_first_invocation: { const fs_reg value = get_nir_src(instr->src[0]); - bld.MOV(retype(dest, BRW_REGISTER_TYPE_D), - bld.emit_uniformize(value)); + bld.MOV(retype(dest, value.type), bld.emit_uniformize(value)); break; } |