-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path0010-i965-remove-read-only-restriction-of-imported-buffer.patch
93 lines (87 loc) · 3.56 KB
/
0010-i965-remove-read-only-restriction-of-imported-buffer.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
From f8e930c2828ae58d9b2b1e2ff59ebe69828a01ce Mon Sep 17 00:00:00 2001
From: Zach Reizner <[email protected]>
Date: Fri, 3 Oct 2014 16:20:10 -0700
Subject: [PATCH 10/13] i965: remove read-only restriction of imported buffers
---
src/mesa/drivers/dri/i965/intel_fbo.c | 7 -------
src/mesa/drivers/dri/i965/intel_image.h | 9 +--------
src/mesa/drivers/dri/i965/intel_screen.c | 1 -
src/mesa/drivers/dri/i965/intel_tex_image.c | 18 ------------------
4 files changed, 1 insertion(+), 34 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index 4a03b57..4a04528 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:
diff --git a/src/mesa/drivers/dri/i965/intel_image.h b/src/mesa/drivers/dri/i965/intel_image.h
index 0cae711..e6ad06e 100644
--- a/src/mesa/drivers/dri/i965/intel_image.h
+++ b/src/mesa/drivers/dri/i965/intel_image.h
@@ -89,14 +89,7 @@ struct __DRIimageRec {
GLuint tile_y;
bool has_depthstencil;
- /**
- * Provided by EGL_EXT_image_dma_buf_import.
- *
- * The flag is set in order to restrict the use of the image later on.
- *
- * See intel_image_target_texture_2d()
- */
- bool dma_buf_imported;
+ /* Provided by EGL_EXT_image_dma_buf_import */
enum __DRIYUVColorSpace yuv_color_space;
enum __DRISampleRange sample_range;
enum __DRIChromaSiting horizontal_siting;
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 6618c1a..d15434c 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -732,7 +732,6 @@ intel_create_image_from_dma_bufs(__DRIscreen *screen,
return NULL;
}
- image->dma_buf_imported = true;
image->yuv_color_space = yuv_color_space;
image->sample_range = sample_range;
image->horizontal_siting = horizontal_siting;
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index 3317779..7a8722b 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -384,24 +384,6 @@ intel_image_target_texture_2d(struct gl_context *ctx, GLenum target,
if (image == NULL)
return;
- /**
- * Images originating via EGL_EXT_image_dma_buf_import can be used only
- * with GL_OES_EGL_image_external only.
- */
- if (image->dma_buf_imported && target != GL_TEXTURE_EXTERNAL_OES) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glEGLImageTargetTexture2DOES(dma buffers can be used with "
- "GL_OES_EGL_image_external only");
- return;
- }
-
- if (target == GL_TEXTURE_EXTERNAL_OES && !image->dma_buf_imported) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glEGLImageTargetTexture2DOES(external target is enabled only "
- "for images created with EGL_EXT_image_dma_buf_import");
- return;
- }
-
/* Disallow depth/stencil textures: we don't have a way to pass the
* separate stencil miptree of a GL_DEPTH_STENCIL texture through.
*/
--
1.9.1