mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
st/mesa: fold GLThread.enabled into pin_thread_counter to skip that checking
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20287>
This commit is contained in:
parent
23f9f6787a
commit
ea11f48a53
2 changed files with 3 additions and 2 deletions
|
|
@ -152,6 +152,9 @@ _mesa_glthread_init(struct gl_context *ctx)
|
|||
|
||||
glthread->LastDListChangeBatchIndex = -1;
|
||||
|
||||
/* glthread takes over all L3 pinning */
|
||||
ctx->st->pin_thread_counter = ST_L3_PINNING_DISABLED;
|
||||
|
||||
/* Execute the thread initialization function in the thread. */
|
||||
struct util_queue_fence fence;
|
||||
util_queue_fence_init(&fence);
|
||||
|
|
|
|||
|
|
@ -91,8 +91,6 @@ prepare_draw(struct st_context *st, struct gl_context *ctx, uint64_t state_mask)
|
|||
* running on. The main thread can move between CCXs.
|
||||
*/
|
||||
if (unlikely(st->pin_thread_counter != ST_L3_PINNING_DISABLED &&
|
||||
/* no glthread */
|
||||
!ctx->GLThread.enabled &&
|
||||
/* do it occasionally */
|
||||
++st->pin_thread_counter % 512 == 0)) {
|
||||
st->pin_thread_counter = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue