From f277bd3c228f8ee349d2f41a52adae3678ddd019 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 25 Mar 2019 04:57:27 +0000 Subject: 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 --- src/gallium/drivers/panfrost/pan_context.c | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'src/gallium/drivers/panfrost/pan_context.c') 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); -- cgit v1.2.3