intel/compiler: remove gfx6 gather wa from backend.
Crocus lowers this in the frontend, they key member is still used but reset prior to backend. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14202>
This commit is contained in:
@@ -2278,10 +2278,6 @@ vec4_visitor::nir_emit_texture(nir_tex_instr *instr)
|
||||
src_reg(inst->dst), brw_imm_d(1));
|
||||
}
|
||||
|
||||
if (devinfo->ver == 6 && instr->op == nir_texop_tg4) {
|
||||
emit_gfx6_gather_wa(key_tex->gfx6_gather_wa[texture], inst->dst);
|
||||
}
|
||||
|
||||
if (instr->op == nir_texop_query_levels) {
|
||||
/* # levels is in .w */
|
||||
src_reg swizzled(dest);
|
||||
@@ -2319,33 +2315,6 @@ vec4_visitor::emit_mcs_fetch(const glsl_type *coordinate_type,
|
||||
return src_reg(inst->dst);
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply workarounds for Gfx6 gather with UINT/SINT
|
||||
*/
|
||||
void
|
||||
vec4_visitor::emit_gfx6_gather_wa(uint8_t wa, dst_reg dst)
|
||||
{
|
||||
if (!wa)
|
||||
return;
|
||||
|
||||
int width = (wa & WA_8BIT) ? 8 : 16;
|
||||
dst_reg dst_f = dst;
|
||||
dst_f.type = BRW_REGISTER_TYPE_F;
|
||||
|
||||
/* Convert from UNORM to UINT */
|
||||
emit(MUL(dst_f, src_reg(dst_f), brw_imm_f((float)((1 << width) - 1))));
|
||||
emit(MOV(dst, src_reg(dst_f)));
|
||||
|
||||
if (wa & WA_SIGN) {
|
||||
/* Reinterpret the UINT value as a signed INT value by
|
||||
* shifting the sign bit into place, then shifting back
|
||||
* preserving sign.
|
||||
*/
|
||||
emit(SHL(dst, src_reg(dst), brw_imm_d(32 - width)));
|
||||
emit(ASR(dst, src_reg(dst), brw_imm_d(32 - width)));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
vec4_visitor::nir_emit_undef(nir_ssa_undef_instr *instr)
|
||||
{
|
||||
|
Reference in New Issue
Block a user