From b30792730341c3bd20b3dd548a3b47c664834a1e Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 26 Mar 2021 16:34:48 +0100 Subject: [PATCH] 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 Part-of: --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index 6a7cd61423b..128ba84ca06 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -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);