aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2018-11-12 13:20:15 +0100
committerErik Faye-Lund <[email protected]>2019-10-28 08:51:43 +0000
commit4249e4a598a3057af71e095e70b98cf710d325ad (patch)
tree5a67fe7912dad45605f0b980335a9e265da68598
parentc3bd0274c6df49c5754165b6458ef3560bced8fe (diff)
zink/spirv: implement point-sprites
This passes glsl-fs-pointcoord_gles2 from piglit. Acked-by: Jordan Justen <[email protected]>
-rw-r--r--src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c4
-rw-r--r--src/gallium/drivers/zink/zink_screen.c3
2 files changed, 7 insertions, 0 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 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;