nvk: Remove reference to genUserClip
authorM Henning <drawoc@darkrefraction.com>
Sat, 12 Aug 2023 23:34:32 +0000 (19:34 -0400)
committerM Henning <drawoc@darkrefraction.com>
Sat, 12 Aug 2023 23:38:18 +0000 (19:38 -0400)
GL uses this for adding clip distances to shaders that are missing them,
but the vulkan spec guarantees "A shader must write a single clip distance
for each enabled clip half-space"

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24657>

src/nouveau/vulkan/nvk_shader.c
src/nouveau/vulkan/nvk_shader.h

index da2d7d0..1b4cb42 100644 (file)
@@ -782,9 +782,6 @@ nvk_vtgp_gen_header(struct nvk_shader *vs, struct nv50_ir_prog_info_out *info)
    for (i = 0; i < info->io.cullDistances; ++i)
       vs->vs.clip_mode |= 1 << ((info->io.clipDistances + i) * 4);
 
-   if (info->io.genUserClip < 0)
-      vs->vs.num_ucps = 8 + 1; /* prevent rebuilding */
-
    vs->vs.layer_viewport_relative = info->io.layer_viewport_relative;
 
    return 0;
index 1314abf..54d0dfd 100644 (file)
@@ -50,7 +50,6 @@ struct nvk_shader {
       uint32_t clip_mode; /* clip/cull selection */
       uint8_t clip_enable; /* mask of defined clip planes */
       uint8_t cull_enable; /* mask of defined cull distances */
-      uint8_t num_ucps; /* also set to max if ClipDistance is used */
       uint8_t edgeflag; /* attribute index of edgeflag input */
       bool need_vertex_id;
       bool need_draw_parameters;