diff options
author | Kenneth Graunke <[email protected]> | 2019-10-03 12:11:22 -0400 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-10-05 13:19:37 +0000 |
commit | 72beda4fb451d35fdda60f015f370c24af114ccf (patch) | |
tree | 19085935e67554d6ceb4f36899ef7b487d52ce94 /src | |
parent | 6309c31fd815285dab4d6e79dcbdd4773350e50f (diff) |
st/dri: Perform MSAA downsampling for __DRI2_THROTTLE_COPYSUBBUFFER
glXCopySubBufferMESA copies data from the back buffer to the front,
so it needs to perform a MSAA downsampling operation just like
glXSwapBuffers would.
Currently, the CopySubBuffer implementations supply a throttle reason
of __DRI2_THROTTLE_SWAPBUFFERS, so they hit this path and work today.
But we'd like to avoid swapbuffer throttling in this case, so the next
patch will change that reason.
Tested-by: Michel Dänzer <[email protected]> # DRI3 only
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/dri/dri_drawable.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index b99d1e9de51..8f5055407cd 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -511,13 +511,15 @@ dri_flush(__DRIcontext *cPriv, struct pipe_context *pipe = st->pipe; if (drawable->stvis.samples > 1 && - reason == __DRI2_THROTTLE_SWAPBUFFER) { + (reason == __DRI2_THROTTLE_SWAPBUFFER || + reason == __DRI2_THROTTLE_COPYSUBBUFFER)) { /* Resolve the MSAA back buffer. */ dri_pipe_blit(st->pipe, drawable->textures[ST_ATTACHMENT_BACK_LEFT], drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]); - if (drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT] && + if (reason == __DRI2_THROTTLE_SWAPBUFFER && + drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT] && drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]) { swap_msaa_buffers = true; } |