mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
brw: avoid setting up the sampler header bits when unused
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33704>
This commit is contained in:
parent
8b4f997168
commit
d0c980caa7
1 changed files with 16 additions and 1 deletions
|
|
@ -729,6 +729,21 @@ shader_opcode_needs_header(opcode op,
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
shader_opcode_uses_sampler(opcode op)
|
||||
{
|
||||
switch (op) {
|
||||
case SHADER_OPCODE_SAMPLEINFO_LOGICAL:
|
||||
case SHADER_OPCODE_TXF_LOGICAL:
|
||||
case SHADER_OPCODE_TXS_LOGICAL:
|
||||
case SHADER_OPCODE_IMAGE_SIZE_LOGICAL:
|
||||
return false;
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
lower_sampler_logical_send(const brw_builder &bld, brw_inst *inst,
|
||||
const brw_reg &coordinate,
|
||||
|
|
@ -868,7 +883,7 @@ lower_sampler_logical_send(const brw_builder &bld, brw_inst *inst,
|
|||
ubld1.SHL(tmp, tmp, brw_imm_ud(4));
|
||||
ubld1.ADD(component(header, 3), sampler_state_ptr, tmp);
|
||||
}
|
||||
} else if (devinfo->ver >= 11) {
|
||||
} else if (devinfo->ver >= 11 && shader_opcode_uses_sampler(op)) {
|
||||
/* Gfx11+ sampler message headers include bits in 4:0 which conflict
|
||||
* with the ones included in g0.3 bits 4:0. Mask them out.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue