[Mesa-dev] [PATCH V2 11/15] mesa: add KHR_no_error support for FramebufferTextureLayer
Timothy Arceri
tarceri at itsqueeze.com
Wed May 10 01:56:54 UTC 2017
V2: use frame_buffer_texture_layer_no_error() helper
---
src/mapi/glapi/gen/ARB_framebuffer_object.xml | 2 +-
src/mesa/main/fbobject.c | 15 +++++++++++++++
src/mesa/main/fbobject.h | 4 ++++
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/mapi/glapi/gen/ARB_framebuffer_object.xml b/src/mapi/glapi/gen/ARB_framebuffer_object.xml
index ce5e45d..76114eb 100644
--- a/src/mapi/glapi/gen/ARB_framebuffer_object.xml
+++ b/src/mapi/glapi/gen/ARB_framebuffer_object.xml
@@ -239,21 +239,21 @@
<function name="FramebufferTexture3D" no_error="true">
<param name="target" type="GLenum"/>
<param name="attachment" type="GLenum"/>
<param name="textarget" type="GLenum"/>
<param name="texture" type="GLuint"/>
<param name="level" type="GLint"/>
<param name="layer" type="GLint"/>
<glx rop="4323"/>
</function>
- <function name="FramebufferTextureLayer" es2="3.0">
+ <function name="FramebufferTextureLayer" es2="3.0" no_error="true">
<param name="target" type="GLenum"/>
<param name="attachment" type="GLenum"/>
<param name="texture" type="GLuint"/>
<param name="level" type="GLint"/>
<param name="layer" type="GLint"/>
<glx rop="237"/>
</function>
<function name="FramebufferRenderbuffer" es2="2.0">
<param name="target" type="GLenum"/>
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 3338974..c209be0 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3452,20 +3452,35 @@ frame_buffer_texture_layer_no_error(struct gl_context *ctx,
layer = 0;
}
}
_mesa_framebuffer_texture(ctx, fb, attachment, att, texObj, textarget,
level, layer, GL_FALSE);
}
void GLAPIENTRY
+_mesa_FramebufferTextureLayer_no_error(GLenum target, GLenum attachment,
+ GLuint texture, GLint level,
+ GLint layer)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ /* Get the framebuffer object */
+ struct gl_framebuffer *fb = get_framebuffer_target(ctx, target);
+
+ frame_buffer_texture_layer_no_error(ctx, fb, attachment, texture, level,
+ layer, "glFramebufferTextureLayer");
+}
+
+
+void GLAPIENTRY
_mesa_FramebufferTextureLayer(GLenum target, GLenum attachment,
GLuint texture, GLint level, GLint layer)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_framebuffer *fb;
struct gl_texture_object *texObj;
GLenum textarget = 0;
const char *func = "glFramebufferTextureLayer";
diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
index df1696d..7c32b87 100644
--- a/src/mesa/main/fbobject.h
+++ b/src/mesa/main/fbobject.h
@@ -234,20 +234,24 @@ _mesa_FramebufferTexture2D(GLenum target, GLenum attachment,
extern void GLAPIENTRY
_mesa_FramebufferTexture3D_no_error(GLenum target, GLenum attachment,
GLenum textarget, GLuint texture,
GLint level, GLint layer);
extern void GLAPIENTRY
_mesa_FramebufferTexture3D(GLenum target, GLenum attachment,
GLenum textarget, GLuint texture,
GLint level, GLint layer);
extern void GLAPIENTRY
+_mesa_FramebufferTextureLayer_no_error(GLenum target, GLenum attachment,
+ GLuint texture, GLint level,
+ GLint layer);
+extern void GLAPIENTRY
_mesa_FramebufferTextureLayer(GLenum target, GLenum attachment,
GLuint texture, GLint level, GLint layer);
extern void GLAPIENTRY
_mesa_NamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment,
GLuint texture, GLint level, GLint layer);
extern void GLAPIENTRY
_mesa_FramebufferTexture(GLenum target, GLenum attachment,
GLuint texture, GLint level);
--
2.9.3
More information about the mesa-dev
mailing list