nir/lower_clip: replace bogus comment about gl_ClipDistance reading in GL
gl_ClipDistance most definitely can be read in fragment shaders since GLSL 1.30. This is also accessible in ES with EXT_clip_cull_distance. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13917>
This commit is contained in:
parent
b5848b2dac
commit
a8930e6302
|
@ -491,9 +491,9 @@ nir_lower_clip_fs(nir_shader *shader, unsigned ucp_enables,
|
|||
if (!ucp_enables)
|
||||
return false;
|
||||
|
||||
/* Fragment shaders can't read gl_ClipDistance[] in OpenGL so it will not
|
||||
* have the variable defined, but Vulkan allows this, in which case the
|
||||
* SPIR-V compiler would have already added it as a compact array.
|
||||
/* No hard reason to require use_clipdist_arr to work with
|
||||
* frag-shader-based gl_ClipDistance, except that the only user that does
|
||||
* not enable this does not support GL 3.0 (or EXT_clip_cull_distance).
|
||||
*/
|
||||
if (!fs_has_clip_dist_input_var(shader, in, &ucp_enables))
|
||||
create_clipdist_vars(shader, in, ucp_enables, false, use_clipdist_array);
|
||||
|
|
Loading…
Reference in New Issue