From: Erik Faye-Lund Date: Mon, 12 Nov 2018 12:20:15 +0000 (+0100) Subject: zink/spirv: implement point-sprites X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4249e4a598a3057af71e095e70b98cf710d325ad;p=mesa.git zink/spirv: implement point-sprites This passes glsl-fs-pointcoord_gles2 from piglit. Acked-by: Jordan Justen --- 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;