mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
gallium: add flag PIPE_CONTEXT_PREFER_THREADED
State trackers can set this to tell the driver when u_threaded_context is desirable. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
This commit is contained in:
parent
7622181cad
commit
8559fa505d
2 changed files with 9 additions and 1 deletions
|
|
@ -383,6 +383,14 @@ enum pipe_flush_flags
|
|||
*/
|
||||
#define PIPE_CONTEXT_ROBUST_BUFFER_ACCESS (1 << 2)
|
||||
|
||||
/**
|
||||
* Prefer threaded pipe_context. It also implies that video codec functions
|
||||
* will not be used. (they will be either no-ops or NULL when threading is
|
||||
* enabled)
|
||||
*/
|
||||
#define PIPE_CONTEXT_PREFER_THREADED (1 << 3)
|
||||
|
||||
|
||||
/**
|
||||
* Flags for pipe_context::memory_barrier.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -647,7 +647,7 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
|
|||
struct pipe_context *pipe;
|
||||
struct gl_config mode;
|
||||
gl_api api;
|
||||
unsigned ctx_flags = 0;
|
||||
unsigned ctx_flags = PIPE_CONTEXT_PREFER_THREADED;
|
||||
|
||||
if (!(stapi->profile_mask & (1 << attribs->profile)))
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue