diff options
author | Eric Anholt <[email protected]> | 2016-07-26 17:31:44 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2016-08-22 11:52:26 -0700 |
commit | e8378fee0c20ecd26451c079c725420077606cb9 (patch) | |
tree | 3603185648555d9e8a7a70efa52a79f2f97fd629 /src/compiler/nir/nir_intrinsics.h | |
parent | 475ce61d1aa0fb06202511b4ea8ad9bd1fab64d0 (diff) |
nir: Define system values for vc4's blending-lowering arguments.
In the GLSL-to-NIR conversion of VC4, I had a bit of trouble with what I
was calling the "state uniforms" that I was putting into the NIR fighting
with its other lowering passes. Instead of using magic uniform base
numbers in the backend, follow the lead of load_user_clip_plane and just
define system values for them.
v2: Fix unintended change to channel_num, drop unspecified const_index
value on blend_const_color_r_float.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_intrinsics.h')
-rw-r--r-- | src/compiler/nir/nir_intrinsics.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_intrinsics.h b/src/compiler/nir/nir_intrinsics.h index 4cb04373e00..b27a148c951 100644 --- a/src/compiler/nir/nir_intrinsics.h +++ b/src/compiler/nir/nir_intrinsics.h @@ -310,6 +310,15 @@ SYSTEM_VALUE(user_clip_plane, 4, 1, UCP_ID, xx, xx) SYSTEM_VALUE(num_work_groups, 3, 0, xx, xx, xx) SYSTEM_VALUE(helper_invocation, 1, 0, xx, xx, xx) SYSTEM_VALUE(channel_num, 1, 0, xx, xx, xx) +SYSTEM_VALUE(alpha_ref_float, 1, 0, xx, xx, xx) + +/* Blend constant color values. Float values are clamped. */ +SYSTEM_VALUE(blend_const_color_r_float, 1, 0, xx, xx, xx) +SYSTEM_VALUE(blend_const_color_g_float, 1, 0, xx, xx, xx) +SYSTEM_VALUE(blend_const_color_b_float, 1, 0, xx, xx, xx) +SYSTEM_VALUE(blend_const_color_a_float, 1, 0, xx, xx, xx) +SYSTEM_VALUE(blend_const_color_rgba8888_unorm, 1, 0, xx, xx, xx) +SYSTEM_VALUE(blend_const_color_aaaa8888_unorm, 1, 0, xx, xx, xx) /** * Barycentric coordinate intrinsics. |