summaryrefslogtreecommitdiffstats
path: root/src/glx/dri3_priv.h
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2014-05-17 12:12:11 -0400
committerDave Airlie <[email protected]>2014-07-01 13:07:52 +1000
commit9320c8fea947fd0f6eb723c67f0bdb947e45c4c3 (patch)
treef7047e99e4a409c39f0bd4721c122796dcfedc32 /src/glx/dri3_priv.h
parent3ecd9e1a93817180fa5b280e5fe11c903cca38ba (diff)
glx/dri3: add GPU offloading support.
The differences with DRI2 GPU offloading are: a) There's no logic for GPU offloading needed in the Xserver b) for DRI2, the card would render to a back buffer, and the content would be copied to the front buffer (the same buffers everytime). Here we can potentially use several back buffers and copy to buffers with no tiling to share with X. We send them with the Present extension. That means than the DRI2 solution is forced to have tearings with GPU offloading. In the ideal scenario, this DRI3 solution doesn't have this problem. However without dma-buf fences, a race can appear (if the card is slow and the rendering hasn't finished before the server card reads the buffer), and then old content is displayed. If a user hits this, he should probably revert to the DRI2 solution (LIBGL_DRI3_DISABLE). Users with cards fast enough seem to not hit this in practice (I have an Amd hd 7730m, and I don't hit this, except if I force a low dpm mode) c) for non-fullscreen apps, the DRI2 GPU offloading solution requires compositing. This DRI3 solution doesn't have this requirement. Rendering to a pixmap also works. d) There is no need to have a DDX loaded for the secondary card. V4: Fixes some piglit tests Signed-off-by: Axel Davy <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/glx/dri3_priv.h')
-rw-r--r--src/glx/dri3_priv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h
index 689488641a1..c0e35ee4bbf 100644
--- a/src/glx/dri3_priv.h
+++ b/src/glx/dri3_priv.h
@@ -72,6 +72,7 @@ enum dri3_buffer_type {
struct dri3_buffer {
__DRIimage *image;
+ __DRIimage *linear_buffer;
uint32_t pixmap;
/* Synchronization between the client and X server is done using an
@@ -135,6 +136,7 @@ struct dri3_screen {
void *driver;
int fd;
+ int is_different_gpu;
Bool show_fps;
};