From 4b07182c8cce261517a1ff5c4bb20772aa065041 Mon Sep 17 00:00:00 2001 From: antonino Date: Mon, 6 Mar 2023 12:09:00 +0100 Subject: [PATCH] zink/nir_to_spirv: add support for `nir_intrinsic_load_point_coord` Reviewed-By: Mike Blumenkrantz Reviewed-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 78acac13e83..feb36c10e9b 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 @@ -96,7 +96,7 @@ struct ntv_context { primitive_id_var, invocation_id_var, // geometry sample_mask_type, sample_id_var, sample_pos_var, sample_mask_in_var, tess_patch_vertices_in, tess_coord_var, // tess - push_const_var, + push_const_var, point_coord_var, workgroup_id_var, num_workgroups_var, local_invocation_id_var, global_invocation_id_var, local_invocation_index_var, helper_invocation_var, @@ -3283,6 +3283,11 @@ emit_intrinsic(struct ntv_context *ctx, nir_intrinsic_instr *intr) emit_load_uint_input(ctx, intr, &ctx->sample_id_var, "gl_SampleId", SpvBuiltInSampleId); break; + case nir_intrinsic_load_point_coord_maybe_flipped: + case nir_intrinsic_load_point_coord: + emit_load_vec_input(ctx, intr, &ctx->point_coord_var, "gl_PointCoord", SpvBuiltInPointCoord, nir_type_float); + break; + case nir_intrinsic_load_sample_pos: emit_load_vec_input(ctx, intr, &ctx->sample_pos_var, "gl_SamplePosition", SpvBuiltInSamplePosition, nir_type_float); break;