summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_fbo.c
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2015-04-09 20:29:59 -0700
committerChad Versace <[email protected]>2015-04-13 07:36:32 -0700
commita76dc15b2b37db18151b42be63b49438588a92fe (patch)
tree92536d9ae63adfe63973ff250636e03e29d2e03f /src/mesa/drivers/dri/i965/intel_fbo.c
parent2943b15ce7ce1bc29424949124a69538253008f7 (diff)
i965: Lift some restrictions on dma_buf EGLImages
Allow glEGLImageTargetRenderbufferStorageOES and glEGLImageTargetTexture2DOES for dma_buf EGLImages if the image is a single RGBA8 unorm plane. This is safe, despite fast color clears, because i965 disables allocation of auxiliary buffers for EGLImages. Chrome OS needs this, because its compositor uses dma_buf EGLImages for its scanout buffers. Testing: - Tested on Ivybridge Chromebook Pixel with WebGL Aquarium and YouTube. - No Piglit regressions on Broadwell with `piglit run -p gbm tests/quick.py`, with my Piglit patches that update the EGL_EXT_image_dma_buf_import tests. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_fbo.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_fbo.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index fb26038f327..8a398f73e49 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -363,13 +363,6 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx,
return;
}
- /* Buffers originating from outside are for read-only. */
- if (image->dma_buf_imported) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glEGLImageTargetRenderbufferStorage(dma buffers are read-only)");
- return;
- }
-
/* __DRIimage is opaque to the core so it has to be checked here */
switch (image->format) {
case MESA_FORMAT_R8G8B8A8_UNORM: