gallium/util: add set_frontend_noop into driver_noop and u_threaded_context

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7031>
This commit is contained in:
Marek Olšák
2020-09-21 02:22:25 -04:00
committed by Marge Bot
parent 72fa3372cc
commit d5575ca7a1
4 changed files with 22 additions and 0 deletions

View File

@@ -343,6 +343,10 @@ static void noop_set_context_param(struct pipe_context *ctx,
{
}
static void noop_set_frontend_noop(struct pipe_context *ctx, bool enable)
{
}
static struct pipe_context *noop_create_context(struct pipe_screen *screen,
void *priv, unsigned flags)
{
@@ -383,6 +387,7 @@ static struct pipe_context *noop_create_context(struct pipe_screen *screen,
ctx->texture_subdata = noop_texture_subdata;
ctx->invalidate_resource = noop_invalidate_resource;
ctx->set_context_param = noop_set_context_param;
ctx->set_frontend_noop = noop_set_frontend_noop;
noop_init_state_functions(ctx);
return ctx;

View File

@@ -1993,6 +1993,20 @@ tc_set_context_param(struct pipe_context *_pipe,
}
}
static void
tc_call_set_frontend_noop(struct pipe_context *pipe, union tc_payload *payload)
{
pipe->set_frontend_noop(pipe, payload->boolean);
}
static void
tc_set_frontend_noop(struct pipe_context *_pipe, bool enable)
{
struct threaded_context *tc = threaded_context(_pipe);
tc_add_small_call(tc, TC_CALL_set_frontend_noop)->boolean = enable;
}
/********************************************************************
* draw, launch, clear, blit, copy, flush
@@ -2793,6 +2807,7 @@ threaded_context_create(struct pipe_context *pipe,
CTX_INIT(create_image_handle);
CTX_INIT(delete_image_handle);
CTX_INIT(make_image_handle_resident);
CTX_INIT(set_frontend_noop);
#undef CTX_INIT
if (out)

View File

@@ -311,6 +311,7 @@ union tc_payload {
struct pipe_transfer *transfer;
struct pipe_fence_handle *fence;
uint64_t handle;
bool boolean;
};
#ifdef _MSC_VER

View File

@@ -50,6 +50,7 @@ CALL(make_texture_handle_resident)
CALL(delete_image_handle)
CALL(make_image_handle_resident)
CALL(set_context_param)
CALL(set_frontend_noop)
CALL(bind_blend_state)
CALL(bind_rasterizer_state)