From 4249e4a598a3057af71e095e70b98cf710d325ad Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 12 Nov 2018 13:20:15 +0100 Subject: [PATCH] zink/spirv: implement point-sprites This passes glsl-fs-pointcoord_gles2 from piglit. Acked-by: Jordan Justen --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 4 ++++ src/gallium/drivers/zink/zink_screen.c | 3 +++ 2 files changed, 7 insertions(+) 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 56f5628aa5f..166bdf29949 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 @@ -134,6 +134,10 @@ emit_input(struct ntv_context *ctx, struct nir_variable *var) spirv_builder_emit_builtin(&ctx->builder, var_id, SpvBuiltInFragCoord); break; + case VARYING_SLOT_PNTC: + spirv_builder_emit_builtin(&ctx->builder, var_id, SpvBuiltInPointCoord); + break; + default: spirv_builder_emit_location(&ctx->builder, var_id, var->data.driver_location); diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index dd1d304b67b..5f8bbfd9f05 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -96,6 +96,9 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS: return screen->props.limits.maxFragmentDualSrcAttachments; + case PIPE_CAP_POINT_SPRITE: + return 1; + case PIPE_CAP_MAX_RENDER_TARGETS: return screen->props.limits.maxColorAttachments; -- 2.30.2