diff options
author | Rob Clark <[email protected]> | 2015-09-09 14:57:15 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-09-17 19:57:21 -0400 |
commit | 509e0c4505813ebeaad1c95822156ed2df627487 (patch) | |
tree | e0df1d29f1dc4a329653f34178056437ddfaccbf /src/glsl/nir/nir.h | |
parent | 53671a37238fd34f08d91d5d079d26437f21a473 (diff) |
nir: add lowering stage for user-clip-planes / clipdist
The vertex shader lowering adds calculation for CLIPDIST, if needed
(ie. user-clip-planes), and the frag shader lowering adds conditional
kills based on CLIPDIST value (which should be treated as a normal
interpolated varying by the driver).
Note that this won't quite do the right thing in the face of MSAA plus
user-clip-planes, since all the samples would be killed or not (rather
than potentially only a portion of them). But it's better than no UCP
support at all for drivers that don't have this in hw.
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir.h')
-rw-r--r-- | src/glsl/nir/nir.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index f64bb2837c3..916226791e6 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -1839,6 +1839,9 @@ void nir_lower_system_values(nir_shader *shader); void nir_lower_tex_projector(nir_shader *shader); void nir_lower_idiv(nir_shader *shader); +void nir_lower_clip_vs(nir_shader *shader, unsigned ucp_enables); +void nir_lower_clip_fs(nir_shader *shader, unsigned ucp_enables); + void nir_lower_atomics(nir_shader *shader); void nir_lower_to_source_mods(nir_shader *shader); |