summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_context.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-03-25 04:57:27 +0000
committerAlyssa Rosenzweig <[email protected]>2019-03-26 23:35:58 +0000
commitf277bd3c228f8ee349d2f41a52adae3678ddd019 (patch)
tree7f09f6b6b82133c07eae6e3985e398b7369b4e99 /src/gallium/drivers/panfrost/pan_context.c
parent89989e653e8158b02e5db17ea34834ed67d85c37 (diff)
panfrost: Stub out ES3 caps/callbacks
Although this is not functional (and the command stream side is not aiming for ES3 right now), this is enough to run dEQP-GLES3 shader tests with the version override directive; this is useful, as some ES3 shader feature can occur in ES2 class shaders due to lowering. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_context.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 80b9512371b..fd1fa7f328b 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -2403,6 +2403,46 @@ panfrost_get_query_result(struct pipe_context *pipe,
return true;
}
+static struct pipe_stream_output_target *
+panfrost_create_stream_output_target(struct pipe_context *pctx,
+ struct pipe_resource *prsc,
+ unsigned buffer_offset,
+ unsigned buffer_size)
+{
+ struct pipe_stream_output_target *target;
+
+ target = CALLOC_STRUCT(pipe_stream_output_target);
+
+ if (!target)
+ return NULL;
+
+ pipe_reference_init(&target->reference, 1);
+ pipe_resource_reference(&target->buffer, prsc);
+
+ target->context = pctx;
+ target->buffer_offset = buffer_offset;
+ target->buffer_size = buffer_size;
+
+ return target;
+}
+
+static void
+panfrost_stream_output_target_destroy(struct pipe_context *pctx,
+ struct pipe_stream_output_target *target)
+{
+ pipe_resource_reference(&target->buffer, NULL);
+ free(target);
+}
+
+static void
+panfrost_set_stream_output_targets(struct pipe_context *pctx,
+ unsigned num_targets,
+ struct pipe_stream_output_target **targets,
+ const unsigned *offsets)
+{
+ /* STUB */
+}
+
static void
panfrost_setup_hardware(struct panfrost_context *ctx)
{
@@ -2507,6 +2547,10 @@ panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned flags)
gallium->end_query = panfrost_end_query;
gallium->get_query_result = panfrost_get_query_result;
+ gallium->create_stream_output_target = panfrost_create_stream_output_target;
+ gallium->stream_output_target_destroy = panfrost_stream_output_target_destroy;
+ gallium->set_stream_output_targets = panfrost_set_stream_output_targets;
+
panfrost_resource_context_init(gallium);
pscreen->driver->init_context(ctx);