diff options
author | Rob Clark <[email protected]> | 2019-04-19 11:15:40 -0700 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-04-25 14:13:31 -0700 |
commit | 2f0b9d22495bf32722992880381cc7bd7788bb96 (patch) | |
tree | 931b1f0f2a30f8069bcac9257ca3039062a3b646 /src/compiler | |
parent | c4f423aa366548b919ed78407bacab032a077398 (diff) |
freedreno/ir3: lower load_barycentric_at_offset
Calculates i,j at specified offset within a pixel. A new load_size_ir3
intrinsic is used in conjunction with fddx/fddy to translate the offset
into primitive space and adjust the i,j from load_barycentric_pixel
accordingly.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_intrinsics.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py index db1cf5c7b79..3a0470c2ca1 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -609,6 +609,9 @@ barycentric("at_offset", [2]) intrinsic("load_sample_pos_from_id", src_comp=[1], dest_comp=2, flags=[CAN_ELIMINATE, CAN_REORDER]) +# Loads what I believe is the primitive size, for scaling ij to pixel size: +intrinsic("load_size_ir3", dest_comp=1, flags=[CAN_ELIMINATE, CAN_REORDER]) + # Load operations pull data from some piece of GPU memory. All load # operations operate in terms of offsets into some piece of theoretical # memory. Loads from externally visible memory (UBO and SSBO) simply take a |