diff options
author | Jason Ekstrand <[email protected]> | 2018-10-31 09:52:33 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-01-29 18:43:55 +0000 |
commit | f547cebbe062b094077ed32c8d557c7162c1c4fb (patch) | |
tree | 48082757334c30399a84c6c7320c14792ea9fba5 /src/intel/compiler/brw_fs.cpp | |
parent | d2d3e0450119d8c52a3dd0dd89bfc9182a1cfce7 (diff) |
intel/fs: Use a logical opcode for IMAGE_SIZE
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_fs.cpp')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index f6525fe467c..35e78eed7f8 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -737,6 +737,7 @@ fs_inst::components_read(unsigned i) const case SHADER_OPCODE_TXF_LOGICAL: case SHADER_OPCODE_TXL_LOGICAL: case SHADER_OPCODE_TXS_LOGICAL: + case SHADER_OPCODE_IMAGE_SIZE_LOGICAL: case FS_OPCODE_TXB_LOGICAL: case SHADER_OPCODE_TXF_CMS_LOGICAL: case SHADER_OPCODE_TXF_CMS_W_LOGICAL: @@ -4675,6 +4676,11 @@ lower_sampler_logical_send_gen7(const fs_builder &bld, fs_inst *inst, opcode op, bld.MOV(retype(sources[length], BRW_REGISTER_TYPE_UD), lod); length++; break; + case SHADER_OPCODE_IMAGE_SIZE: + /* We need an LOD; just use 0 */ + bld.MOV(retype(sources[length], BRW_REGISTER_TYPE_UD), brw_imm_ud(0)); + length++; + break; case SHADER_OPCODE_TXF: /* Unfortunately, the parameters for LD are intermixed: u, lod, v, r. * On Gen9 they are u, v, lod, r @@ -5157,6 +5163,10 @@ fs_visitor::lower_logical_sends() lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_TXS); break; + case SHADER_OPCODE_IMAGE_SIZE_LOGICAL: + lower_sampler_logical_send(ibld, inst, SHADER_OPCODE_IMAGE_SIZE); + break; + case FS_OPCODE_TXB_LOGICAL: lower_sampler_logical_send(ibld, inst, FS_OPCODE_TXB); break; |