7566503cc1
upgrade the mesa3d and mesa3d-headers to v22.1.3 and copy patch from IMG DDK 1.19 keep the 0002-Force-Mesa-to-use-the-PVR-driver-for-platform-device.patch to force the pvr driver Note that the new version mesa3d support gallium driver and no longer support dri driver Signed-off-by: Andy Hu <andy.hu@starfivetech.com> Signed-off-by: Windsome Zeng <Windsome.Zeng@starfivetech.com>
373 lines
13 KiB
Diff
373 lines
13 KiB
Diff
From 5987d8ad515e94a36eb54aead8ab89f0ad3f427f Mon Sep 17 00:00:00 2001
|
|
From: Brendan King <Brendan.King@imgtec.com>
|
|
Date: Mon, 10 Mar 2014 13:43:45 +0000
|
|
Subject: [PATCH 37/58] Separate EXT_framebuffer_object from ARB version
|
|
|
|
This patch separates the EXT_framebuffer_object entry points from the ARB
|
|
equivalents.
|
|
|
|
Probably not all this separation is necessary; it looks like only
|
|
BindRenderbuffer
|
|
BindFramebuffer
|
|
GetFramebufferAttachmentParameteriv
|
|
take advantage of the split.
|
|
|
|
Next time this patch is implemented, see if it can be trimmed down to
|
|
just the above functions, as it may be more upstreamable.
|
|
|
|
We may need to implement the EXT restrictions if we want to upstream.
|
|
---
|
|
src/mapi/glapi/gen/EXT_framebuffer_object.xml | 30 +++----
|
|
src/mapi/glapi/gen/static_data.py | 15 ++++
|
|
src/mesa/main/fbobject.c | 83 +++++++++++++++++++
|
|
src/mesa/main/genmipmap.c | 6 ++
|
|
4 files changed, 119 insertions(+), 15 deletions(-)
|
|
|
|
diff --git a/src/mapi/glapi/gen/EXT_framebuffer_object.xml b/src/mapi/glapi/gen/EXT_framebuffer_object.xml
|
|
index 6c0e54af1c9..957b6a3a632 100644
|
|
--- a/src/mapi/glapi/gen/EXT_framebuffer_object.xml
|
|
+++ b/src/mapi/glapi/gen/EXT_framebuffer_object.xml
|
|
@@ -70,7 +70,7 @@
|
|
</enum>
|
|
<enum name="INVALID_FRAMEBUFFER_OPERATION_EXT" value="0x0506"/>
|
|
|
|
- <function name="IsRenderbufferEXT" alias="IsRenderbuffer">
|
|
+ <function name="IsRenderbufferEXT">
|
|
<param name="renderbuffer" type="GLuint"/>
|
|
<return type="GLboolean"/>
|
|
</function>
|
|
@@ -81,30 +81,30 @@
|
|
<glx rop="4316"/>
|
|
</function>
|
|
|
|
- <function name="DeleteRenderbuffersEXT" alias="DeleteRenderbuffers">
|
|
+ <function name="DeleteRenderbuffersEXT">
|
|
<param name="n" type="GLsizei"/>
|
|
<param name="renderbuffers" type="const GLuint *"/>
|
|
</function>
|
|
|
|
- <function name="GenRenderbuffersEXT" alias="GenRenderbuffers">
|
|
+ <function name="GenRenderbuffersEXT">
|
|
<param name="n" type="GLsizei"/>
|
|
<param name="renderbuffers" type="GLuint *"/>
|
|
</function>
|
|
|
|
- <function name="RenderbufferStorageEXT" alias="RenderbufferStorage">
|
|
+ <function name="RenderbufferStorageEXT">
|
|
<param name="target" type="GLenum"/>
|
|
<param name="internalformat" type="GLenum"/>
|
|
<param name="width" type="GLsizei"/>
|
|
<param name="height" type="GLsizei"/>
|
|
</function>
|
|
|
|
- <function name="GetRenderbufferParameterivEXT" alias="GetRenderbufferParameteriv">
|
|
+ <function name="GetRenderbufferParameterivEXT">
|
|
<param name="target" type="GLenum"/>
|
|
<param name="pname" type="GLenum"/>
|
|
<param name="params" type="GLint *"/>
|
|
</function>
|
|
|
|
- <function name="IsFramebufferEXT" alias="IsFramebuffer">
|
|
+ <function name="IsFramebufferEXT">
|
|
<param name="framebuffer" type="GLuint"/>
|
|
<return type="GLboolean"/>
|
|
</function>
|
|
@@ -115,22 +115,22 @@
|
|
<glx rop="4319"/>
|
|
</function>
|
|
|
|
- <function name="DeleteFramebuffersEXT" alias="DeleteFramebuffers">
|
|
+ <function name="DeleteFramebuffersEXT">
|
|
<param name="n" type="GLsizei"/>
|
|
<param name="framebuffers" type="const GLuint *"/>
|
|
</function>
|
|
|
|
- <function name="GenFramebuffersEXT" alias="GenFramebuffers">
|
|
+ <function name="GenFramebuffersEXT">
|
|
<param name="n" type="GLsizei"/>
|
|
<param name="framebuffers" type="GLuint *"/>
|
|
</function>
|
|
|
|
- <function name="CheckFramebufferStatusEXT" alias="CheckFramebufferStatus">
|
|
+ <function name="CheckFramebufferStatusEXT">
|
|
<param name="target" type="GLenum"/>
|
|
<return type="GLenum"/>
|
|
</function>
|
|
|
|
- <function name="FramebufferTexture1DEXT" alias="FramebufferTexture1D">
|
|
+ <function name="FramebufferTexture1DEXT">
|
|
<param name="target" type="GLenum"/>
|
|
<param name="attachment" type="GLenum"/>
|
|
<param name="textarget" type="GLenum"/>
|
|
@@ -138,7 +138,7 @@
|
|
<param name="level" type="GLint"/>
|
|
</function>
|
|
|
|
- <function name="FramebufferTexture2DEXT" alias="FramebufferTexture2D">
|
|
+ <function name="FramebufferTexture2DEXT">
|
|
<param name="target" type="GLenum"/>
|
|
<param name="attachment" type="GLenum"/>
|
|
<param name="textarget" type="GLenum"/>
|
|
@@ -146,7 +146,7 @@
|
|
<param name="level" type="GLint"/>
|
|
</function>
|
|
|
|
- <function name="FramebufferTexture3DEXT" alias="FramebufferTexture3D">
|
|
+ <function name="FramebufferTexture3DEXT">
|
|
<param name="target" type="GLenum"/>
|
|
<param name="attachment" type="GLenum"/>
|
|
<param name="textarget" type="GLenum"/>
|
|
@@ -155,21 +155,21 @@
|
|
<param name="zoffset" type="GLint"/>
|
|
</function>
|
|
|
|
- <function name="FramebufferRenderbufferEXT" alias="FramebufferRenderbuffer">
|
|
+ <function name="FramebufferRenderbufferEXT">
|
|
<param name="target" type="GLenum"/>
|
|
<param name="attachment" type="GLenum"/>
|
|
<param name="renderbuffertarget" type="GLenum"/>
|
|
<param name="renderbuffer" type="GLuint"/>
|
|
</function>
|
|
|
|
- <function name="GetFramebufferAttachmentParameterivEXT" alias="GetFramebufferAttachmentParameteriv">
|
|
+ <function name="GetFramebufferAttachmentParameterivEXT">
|
|
<param name="target" type="GLenum"/>
|
|
<param name="attachment" type="GLenum"/>
|
|
<param name="pname" type="GLenum"/>
|
|
<param name="params" type="GLint *"/>
|
|
</function>
|
|
|
|
- <function name="GenerateMipmapEXT" alias="GenerateMipmap">
|
|
+ <function name="GenerateMipmapEXT">
|
|
<param name="target" type="GLenum"/>
|
|
</function>
|
|
</category>
|
|
diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py
|
|
index 53f381e9297..b5b3ed9e9b8 100644
|
|
--- a/src/mapi/glapi/gen/static_data.py
|
|
+++ b/src/mapi/glapi/gen/static_data.py
|
|
@@ -1707,6 +1707,21 @@ offsets = {
|
|
"FramebufferTextureMultisampleMultiviewOVR" : 1671,
|
|
"MultiDrawArraysIndirectEXT" : 1672,
|
|
"MultiDrawElementsIndirectEXT" : 1673,
|
|
+ "IsRenderbufferEXT" : 1674,
|
|
+ "DeleteRenderbuffersEXT" : 1675,
|
|
+ "GenRenderbuffersEXT" : 1676,
|
|
+ "RenderbufferStorageEXT" : 1677,
|
|
+ "GetRenderbufferParameterivEXT" : 1678,
|
|
+ "IsFramebufferEXT" : 1679,
|
|
+ "DeleteFramebuffersEXT" : 1680,
|
|
+ "GenFramebuffersEXT" : 1681,
|
|
+ "CheckFramebufferStatusEXT" : 1682,
|
|
+ "FramebufferTexture1DEXT" : 1683,
|
|
+ "FramebufferTexture2DEXT" : 1684,
|
|
+ "FramebufferTexture3DEXT" : 1685,
|
|
+ "FramebufferRenderbufferEXT" : 1686,
|
|
+ "GetFramebufferAttachmentParameterivEXT" : 1687,
|
|
+ "GenerateMipmapEXT" : 1688,
|
|
}
|
|
|
|
functions = [
|
|
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
|
|
index 48df6d7c4de..be56c71be97 100644
|
|
--- a/src/mesa/main/fbobject.c
|
|
+++ b/src/mesa/main/fbobject.c
|
|
@@ -2165,6 +2165,11 @@ _mesa_detach_renderbuffer(struct gl_context *ctx,
|
|
return progress;
|
|
}
|
|
|
|
+GLboolean GLAPIENTRY
|
|
+_mesa_IsRenderbufferEXT(GLuint renderbuffer)
|
|
+{
|
|
+ return _mesa_IsRenderbuffer(renderbuffer);
|
|
+}
|
|
|
|
void GLAPIENTRY
|
|
_mesa_DeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
|
|
@@ -2892,6 +2897,12 @@ renderbuffer_storage_target(GLenum target, GLenum internalFormat,
|
|
}
|
|
|
|
|
|
+void GLAPIENTRY
|
|
+_mesa_DeleteRenderbuffersEXT(GLsizei n, const GLuint *renderbuffers)
|
|
+{
|
|
+ _mesa_DeleteRenderbuffers(n, renderbuffers);
|
|
+}
|
|
+
|
|
void GLAPIENTRY
|
|
_mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
|
|
{
|
|
@@ -2929,6 +2940,11 @@ _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
|
|
st_egl_image_target_renderbuffer_storage(ctx, rb, image);
|
|
}
|
|
|
|
+void GLAPIENTRY
|
|
+_mesa_GenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers)
|
|
+{
|
|
+ _mesa_GenRenderbuffers(n, renderbuffers);
|
|
+}
|
|
|
|
/**
|
|
* Helper function for _mesa_GetRenderbufferParameteriv() and
|
|
@@ -2961,6 +2977,12 @@ _mesa_RenderbufferStorage(GLenum target, GLenum internalFormat,
|
|
NO_SAMPLES, 0, "glRenderbufferStorage");
|
|
}
|
|
|
|
+void GLAPIENTRY
|
|
+_mesa_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
|
|
+ GLsizei width, GLsizei height)
|
|
+{
|
|
+ _mesa_RenderbufferStorage(target, internalFormat, width, height);
|
|
+}
|
|
|
|
void GLAPIENTRY
|
|
_mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples,
|
|
@@ -3141,6 +3163,11 @@ _mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname,
|
|
"glGetNamedRenderbufferParameteriv");
|
|
}
|
|
|
|
+void GLAPIENTRY
|
|
+_mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params)
|
|
+{
|
|
+ _mesa_GetRenderbufferParameteriv(target, pname, params);
|
|
+}
|
|
|
|
void GLAPIENTRY
|
|
_mesa_GetNamedRenderbufferParameterivEXT(GLuint renderbuffer, GLenum pname,
|
|
@@ -3174,6 +3201,11 @@ _mesa_IsFramebuffer(GLuint framebuffer)
|
|
return GL_FALSE;
|
|
}
|
|
|
|
+GLboolean GLAPIENTRY
|
|
+_mesa_IsFramebufferEXT(GLuint framebuffer)
|
|
+{
|
|
+ return _mesa_IsFramebuffer(framebuffer);
|
|
+}
|
|
|
|
/**
|
|
* Check if any of the attachments of the given framebuffer are textures
|
|
@@ -3396,6 +3428,11 @@ _mesa_DeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
|
|
}
|
|
}
|
|
|
|
+void GLAPIENTRY
|
|
+_mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers)
|
|
+{
|
|
+ _mesa_DeleteFramebuffers(n, framebuffers);
|
|
+}
|
|
|
|
/**
|
|
* This is the implementation for glGenFramebuffers and glCreateFramebuffers.
|
|
@@ -3442,6 +3479,11 @@ create_framebuffers(GLsizei n, GLuint *framebuffers, bool dsa)
|
|
_mesa_HashUnlockMutex(ctx->Shared->FrameBuffers);
|
|
}
|
|
|
|
+void GLAPIENTRY
|
|
+_mesa_GenFramebuffersEXT(GLsizei n, GLuint *framebuffers)
|
|
+{
|
|
+ _mesa_GenFramebuffers(n, framebuffers);
|
|
+}
|
|
|
|
void GLAPIENTRY
|
|
_mesa_GenFramebuffers(GLsizei n, GLuint *framebuffers)
|
|
@@ -3481,6 +3523,11 @@ _mesa_check_framebuffer_status(struct gl_context *ctx,
|
|
return buffer->_Status;
|
|
}
|
|
|
|
+GLenum GLAPIENTRY
|
|
+_mesa_CheckFramebufferStatusEXT(GLenum target)
|
|
+{
|
|
+ return _mesa_CheckFramebufferStatus(target);
|
|
+}
|
|
|
|
GLenum GLAPIENTRY
|
|
_mesa_CheckFramebufferStatus_no_error(GLenum target)
|
|
@@ -4093,6 +4140,12 @@ _mesa_FramebufferTexture1D_no_error(GLenum target, GLenum attachment,
|
|
texture, level, 0);
|
|
}
|
|
|
|
+void GLAPIENTRY
|
|
+_mesa_FramebufferTexture1DEXT(GLenum target, GLenum attachment,
|
|
+ GLenum textarget, GLuint texture, GLint level)
|
|
+{
|
|
+ _mesa_FramebufferTexture1D(target, attachment, textarget, texture, level);
|
|
+}
|
|
|
|
void GLAPIENTRY
|
|
_mesa_FramebufferTexture1D(GLenum target, GLenum attachment,
|
|
@@ -4133,6 +4186,12 @@ _mesa_FramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment,
|
|
false);
|
|
}
|
|
|
|
+void GLAPIENTRY
|
|
+_mesa_FramebufferTexture2DEXT(GLenum target, GLenum attachment,
|
|
+ GLenum textarget, GLuint texture, GLint level)
|
|
+{
|
|
+ _mesa_FramebufferTexture2D(target, attachment, textarget, texture, level);
|
|
+}
|
|
|
|
void GLAPIENTRY
|
|
_mesa_FramebufferTexture3D_no_error(GLenum target, GLenum attachment,
|
|
@@ -4243,6 +4302,15 @@ frame_buffer_texture(GLuint framebuffer, GLenum target,
|
|
level, 0, layer, layered);
|
|
}
|
|
|
|
+void GLAPIENTRY
|
|
+_mesa_FramebufferTexture3DEXT(GLenum target, GLenum attachment,
|
|
+ GLenum textarget, GLuint texture,
|
|
+ GLint level, GLint zoffset)
|
|
+{
|
|
+ _mesa_FramebufferTexture3D(target, attachment, textarget, texture,
|
|
+ level, zoffset);
|
|
+}
|
|
+
|
|
void GLAPIENTRY
|
|
_mesa_FramebufferTextureLayer_no_error(GLenum target, GLenum attachment,
|
|
GLuint texture, GLint level,
|
|
@@ -4495,6 +4563,15 @@ _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
|
|
renderbuffer, "glFramebufferRenderbuffer");
|
|
}
|
|
|
|
+void GLAPIENTRY
|
|
+_mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
|
|
+ GLenum renderbufferTarget,
|
|
+ GLuint renderbuffer)
|
|
+{
|
|
+ _mesa_FramebufferRenderbuffer(target, attachment, renderbufferTarget,
|
|
+ renderbuffer);
|
|
+}
|
|
+
|
|
void GLAPIENTRY
|
|
_mesa_NamedFramebufferRenderbuffer_no_error(GLuint framebuffer,
|
|
GLenum attachment,
|
|
@@ -4896,6 +4973,12 @@ invalid_pname_enum:
|
|
return;
|
|
}
|
|
|
|
+void GLAPIENTRY
|
|
+_mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
|
|
+ GLenum pname, GLint *params)
|
|
+{
|
|
+ _mesa_GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
|
|
+}
|
|
|
|
void GLAPIENTRY
|
|
_mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
|
|
diff --git a/src/mesa/main/genmipmap.c b/src/mesa/main/genmipmap.c
|
|
index 97d0ab36a13..b30cf4f07c4 100644
|
|
--- a/src/mesa/main/genmipmap.c
|
|
+++ b/src/mesa/main/genmipmap.c
|
|
@@ -286,3 +286,9 @@ _mesa_GenerateMultiTexMipmapEXT(GLenum texunit, GLenum target)
|
|
validate_params_and_generate_mipmap(texObj,
|
|
"glGenerateMultiTexMipmapEXT");
|
|
}
|
|
+
|
|
+void GLAPIENTRY
|
|
+_mesa_GenerateMipmapEXT(GLenum target)
|
|
+{
|
|
+ _mesa_GenerateMipmap(target);
|
|
+}
|
|
--
|
|
2.25.1
|
|
|