intel/fs: avoid reusing the VGRF for uniform load_ubo
Only found 3 shaders affected in Red Dead Redemption : Totals from 3 (0.05% of 5969) affected shaders: Instrs: 2246 -> 2230 (-0.71%) Cycles: 156506 -> 148402 (-5.18%); split: -5.23%, +0.05% This will have a larger effect when we add the load_ubo_uniform_block_intel intrinsic where we will have larger blocks (vec8/vec16 vs vec4 only now). Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23477>
This commit is contained in:

committed by
Marge Bot

parent
ff3494fce3
commit
7eb1e2a690
@@ -4896,7 +4896,6 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
|
|||||||
|
|
||||||
const unsigned block_sz = 64; /* Fetch one cacheline at a time. */
|
const unsigned block_sz = 64; /* Fetch one cacheline at a time. */
|
||||||
const fs_builder ubld = bld.exec_all().group(block_sz / 4, 0);
|
const fs_builder ubld = bld.exec_all().group(block_sz / 4, 0);
|
||||||
const fs_reg packed_consts = ubld.vgrf(BRW_REGISTER_TYPE_UD);
|
|
||||||
|
|
||||||
for (unsigned c = 0; c < instr->num_components;) {
|
for (unsigned c = 0; c < instr->num_components;) {
|
||||||
const unsigned base = load_offset + c * type_size;
|
const unsigned base = load_offset + c * type_size;
|
||||||
@@ -4904,6 +4903,7 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
|
|||||||
const unsigned count = MIN2(instr->num_components - c,
|
const unsigned count = MIN2(instr->num_components - c,
|
||||||
(block_sz - base % block_sz) / type_size);
|
(block_sz - base % block_sz) / type_size);
|
||||||
|
|
||||||
|
const fs_reg packed_consts = ubld.vgrf(BRW_REGISTER_TYPE_UD);
|
||||||
fs_reg srcs[PULL_UNIFORM_CONSTANT_SRCS];
|
fs_reg srcs[PULL_UNIFORM_CONSTANT_SRCS];
|
||||||
srcs[PULL_UNIFORM_CONSTANT_SRC_SURFACE] = surface;
|
srcs[PULL_UNIFORM_CONSTANT_SRC_SURFACE] = surface;
|
||||||
srcs[PULL_UNIFORM_CONSTANT_SRC_SURFACE_HANDLE] = surface_handle;
|
srcs[PULL_UNIFORM_CONSTANT_SRC_SURFACE_HANDLE] = surface_handle;
|
||||||
|
Reference in New Issue
Block a user