From 2780a99ff80cf84f887e8a1dca0079271f90f947 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 22 Feb 2019 14:26:26 -0800 Subject: v3d: Move the stores for fixed function VS output reads into NIR. This lets us emit the VPM_WRITEs directly from nir_intrinsic_store_output() (useful once NIR scheduling is in place so that we can reduce register pressure), and lets future NIR scheduling schedule the math to generate them. Even in the meantime, it looks like this lets NIR DCE some more code and make better decisions. total instructions in shared programs: 6429246 -> 6412976 (-0.25%) total threads in shared programs: 153924 -> 153934 (<.01%) total loops in shared programs: 486 -> 483 (-0.62%) total uniforms in shared programs: 2385436 -> 2388195 (0.12%) Acked-by: Ian Romanick (nir) --- src/compiler/nir/nir_intrinsics.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/compiler/nir') diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py index 9e765951301..1d388c64fc9 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -534,6 +534,15 @@ system_value("subgroup_id", 1) system_value("local_group_size", 3) system_value("global_invocation_id", 3) system_value("work_dim", 1) +# Driver-specific viewport scale/offset parameters. +# +# VC4 and V3D need to emit a scaled version of the position in the vertex +# shaders for binning, and having system values lets us move the math for that +# into NIR. +system_value("viewport_x_scale", 1) +system_value("viewport_y_scale", 1) +system_value("viewport_z_scale", 1) +system_value("viewport_z_offset", 1) # Blend constant color values. Float values are clamped.# system_value("blend_const_color_r_float", 1) -- cgit v1.2.3