zink: remove no-longer-needed clipdist1 patching

Since the last round of enhanced layout packing, it seems like this code
is no longer needed. This allows us to use the HANDLE_EMIT_BUILTIN()
macro, which simplifies things further.

It would have been incorrect anyway, because it's the only code that
uses the location directly as an index. All other locations multiplies
it by four first.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9860>
This commit is contained in:
Erik Faye-Lund
2021-03-26 16:34:48 +01:00
committed by Marge Bot
parent b95c62545a
commit b307927303
@@ -563,20 +563,12 @@ emit_output(struct ntv_context *ctx, struct nir_variable *var)
HANDLE_EMIT_BUILTIN(PSIZ, PointSize);
HANDLE_EMIT_BUILTIN(LAYER, Layer);
HANDLE_EMIT_BUILTIN(PRIMITIVE_ID, PrimitiveId);
HANDLE_EMIT_BUILTIN(CLIP_DIST0, ClipDistance);
HANDLE_EMIT_BUILTIN(CULL_DIST0, CullDistance);
HANDLE_EMIT_BUILTIN(VIEWPORT, ViewportIndex);
HANDLE_EMIT_BUILTIN(TESS_LEVEL_OUTER, TessLevelOuter);
HANDLE_EMIT_BUILTIN(TESS_LEVEL_INNER, TessLevelInner);
case VARYING_SLOT_CLIP_DIST0:
assert(glsl_type_is_array(var->type));
spirv_builder_emit_builtin(&ctx->builder, var_id, SpvBuiltInClipDistance);
/* this can be as large as 2x vec4, which requires 2 slots */
ctx->outputs[VARYING_SLOT_CLIP_DIST1] = var_id;
ctx->so_output_gl_types[VARYING_SLOT_CLIP_DIST1] = var->type;
ctx->so_output_types[VARYING_SLOT_CLIP_DIST1] = var_type;
break;
default:
slot = handle_handle_slot(ctx, var, true);
spirv_builder_emit_location(&ctx->builder, var_id, slot);