mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-04 04:28:17 +02:00
brw,jay: add use_src_xy prog data field
to complete the xy/z/w fragcoord set for accurate calculations in jay without introducing a secondary sideband just for this boolean. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
This commit is contained in:
parent
caf2c32f42
commit
cebc45af43
3 changed files with 3 additions and 2 deletions
|
|
@ -560,6 +560,7 @@ struct brw_fs_prog_data {
|
|||
bool uses_pos_offset;
|
||||
bool uses_omask;
|
||||
bool uses_kill;
|
||||
bool uses_src_xy;
|
||||
bool uses_src_depth;
|
||||
bool uses_src_w;
|
||||
bool uses_depth_w_coefficients;
|
||||
|
|
|
|||
|
|
@ -2642,7 +2642,7 @@ setup_fragment_payload(struct nir_to_jay_state *nj, struct payload_builder *p)
|
|||
}
|
||||
}
|
||||
|
||||
if (BITSET_TEST(nj->nir->info.system_values_read, SYSTEM_VALUE_FRAG_COORD)) {
|
||||
if (nj->s->prog_data->fs.uses_src_xy) {
|
||||
jay_def t = jay_alloc_def(&nj->bld, GPR, 1);
|
||||
jay_def lo = jay_extract_range(nj->payload.u0, 10, 4);
|
||||
jay_EXPAND_QUAD(&nj->bld, t, lo, payload_u1(nj, 10, 4));
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ gather_fs_info(nir_builder *b, nir_intrinsic_instr *intr, void *data)
|
|||
break;
|
||||
|
||||
case nir_intrinsic_load_pixel_coord_intel:
|
||||
BITSET_SET(b->shader->info.system_values_read, SYSTEM_VALUE_FRAG_COORD);
|
||||
prog_data->uses_src_xy = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue