[Mesa-dev] [PATCH V2 12/15] mesa: add KHR_no_error support for NamedFramebufferTextureLayer
Timothy Arceri
tarceri at itsqueeze.com
Wed May 10 01:56:55 UTC 2017
v2: use frame_buffer_texture_layer_no_error() helper
---
src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +-
src/mesa/main/fbobject.c | 17 +++++++++++++++++
src/mesa/main/fbobject.h | 5 +++++
3 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml
index 3cb486e..2f3d60f 100644
--- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
+++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
@@ -171,21 +171,21 @@
<param name="param" type="GLint" />
</function>
<function name="NamedFramebufferTexture">
<param name="framebuffer" type="GLuint" />
<param name="attachment" type="GLenum" />
<param name="texture" type="GLuint" />
<param name="level" type="GLint" />
</function>
- <function name="NamedFramebufferTextureLayer">
+ <function name="NamedFramebufferTextureLayer" no_error="true">
<param name="framebuffer" type="GLuint" />
<param name="attachment" type="GLenum" />
<param name="texture" type="GLuint" />
<param name="level" type="GLint" />
<param name="layer" type="GLint" />
</function>
<function name="NamedFramebufferDrawBuffer">
<param name="framebuffer" type="GLuint" />
<param name="buf" type="GLenum" />
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index c209be0..7f16597 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3518,20 +3518,37 @@ _mesa_FramebufferTextureLayer(GLenum target, GLenum attachment,
_mesa_get_and_validate_attachment(ctx, fb, attachment, func);
if (!att)
return;
_mesa_framebuffer_texture(ctx, fb, attachment, att, texObj, textarget,
level, layer, GL_FALSE);
}
void GLAPIENTRY
+_mesa_NamedFramebufferTextureLayer_no_error(GLuint framebuffer,
+ GLenum attachment,
+ GLuint texture, GLint level,
+ GLint layer)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ /* Get the framebuffer object */
+ struct gl_framebuffer *fb = _mesa_lookup_framebuffer(ctx, framebuffer);
+
+ frame_buffer_texture_layer_no_error(ctx, fb, attachment, texture, level,
+ layer,
+ "glNamedFramebufferTextureLayer");
+}
+
+
+void GLAPIENTRY
_mesa_NamedFramebufferTextureLayer(GLuint framebuffer, 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 = "glNamedFramebufferTextureLayer";
diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
index 7c32b87..a2f9264 100644
--- a/src/mesa/main/fbobject.h
+++ b/src/mesa/main/fbobject.h
@@ -242,20 +242,25 @@ _mesa_FramebufferTexture3D(GLenum target, GLenum attachment,
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_no_error(GLuint framebuffer,
+ 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);
extern void GLAPIENTRY
_mesa_NamedFramebufferTexture(GLuint framebuffer, GLenum attachment,
GLuint texture, GLint level);
--
2.9.3
More information about the mesa-dev
mailing list