mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-03 14:09:33 +03:00
GL: Add function pointers for EXT/NV_framebuffer_blit
Allow the GL backend to call BlitFramebuffer through these extensions. Bug: angleproject:5474 Change-Id: Ic19b0535056c3e2b098dedc60e2eb8da5f862433 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2602702 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
committed by
Commit Bot
parent
dc2cf6fc37
commit
956a358d18
@@ -4,15 +4,15 @@
|
||||
"src/libANGLE/renderer/angle_format.py":
|
||||
"32ba71942c0fd00e6807104f1bb80a3c",
|
||||
"src/libANGLE/renderer/gl/DispatchTableGL_autogen.cpp":
|
||||
"fd5bc9c4871e2ee3c70b1747d3e241be",
|
||||
"02e276847f77b21a1c5d3c4885001ca5",
|
||||
"src/libANGLE/renderer/gl/DispatchTableGL_autogen.h":
|
||||
"9669b0268a205a1231160af0041c8123",
|
||||
"bb30a343213143900e8d72dd4b00bcb0",
|
||||
"src/libANGLE/renderer/gl/generate_gl_dispatch_table.py":
|
||||
"3471991f8743e4d25d68d973de9cac23",
|
||||
"2aaada12f9932fcd113cd4e9728e676a",
|
||||
"src/libANGLE/renderer/gl/gl_bindings_data.json":
|
||||
"b637d9cf24bb25002116cbfdddd2dd90",
|
||||
"6f46f537e07b457850c060ef0c7b76c5",
|
||||
"src/libANGLE/renderer/gl/null_functions.cpp":
|
||||
"812c7b39f7477f22ac8097b6a193103a",
|
||||
"fb829d74cc7fd4dc150bcf84b2eb5910",
|
||||
"src/libANGLE/renderer/gl/null_functions.h":
|
||||
"06e1f3574e207b99db452a4d15a9fdcf"
|
||||
"0f2309c6287baa8b3b130089b7fed969"
|
||||
}
|
||||
@@ -1714,6 +1714,7 @@ void DispatchTableGL::initProcsDesktopGL(const gl::Version &version,
|
||||
if (extensions.count("GL_EXT_framebuffer_blit") != 0)
|
||||
{
|
||||
ASSIGN("glBlitFramebufferEXT", blitFramebuffer);
|
||||
ASSIGN("glBlitFramebufferEXT", blitFramebufferEXT);
|
||||
}
|
||||
|
||||
if (extensions.count("GL_EXT_framebuffer_multisample") != 0)
|
||||
@@ -2505,6 +2506,11 @@ void DispatchTableGL::initProcsGLES(const gl::Version &version,
|
||||
ASSIGN("glReadnPixelsKHR", readnPixels);
|
||||
}
|
||||
|
||||
if (extensions.count("GL_NV_framebuffer_blit") != 0)
|
||||
{
|
||||
ASSIGN("glBlitFramebufferNV", blitFramebufferNV);
|
||||
}
|
||||
|
||||
if (extensions.count("GL_OES_EGL_image") != 0)
|
||||
{
|
||||
ASSIGN("glEGLImageTargetRenderbufferStorageOES", eGLImageTargetRenderbufferStorageOES);
|
||||
@@ -4484,7 +4490,8 @@ void DispatchTableGL::initProcsDesktopGLNULL(const gl::Version &version,
|
||||
|
||||
if (extensions.count("GL_EXT_framebuffer_blit") != 0)
|
||||
{
|
||||
blitFramebuffer = &glBlitFramebufferNULL;
|
||||
blitFramebuffer = &glBlitFramebufferNULL;
|
||||
blitFramebufferEXT = &glBlitFramebufferEXTNULL;
|
||||
}
|
||||
|
||||
if (extensions.count("GL_EXT_framebuffer_multisample") != 0)
|
||||
@@ -5276,6 +5283,11 @@ void DispatchTableGL::initProcsGLESNULL(const gl::Version &version,
|
||||
readnPixels = &glReadnPixelsNULL;
|
||||
}
|
||||
|
||||
if (extensions.count("GL_NV_framebuffer_blit") != 0)
|
||||
{
|
||||
blitFramebufferNV = &glBlitFramebufferNVNULL;
|
||||
}
|
||||
|
||||
if (extensions.count("GL_OES_EGL_image") != 0)
|
||||
{
|
||||
eGLImageTargetRenderbufferStorageOES = &glEGLImageTargetRenderbufferStorageOESNULL;
|
||||
|
||||
@@ -741,6 +741,9 @@ class DispatchTableGL : angle::NonCopyable
|
||||
// GL_EXT_discard_framebuffer
|
||||
PFNGLDISCARDFRAMEBUFFEREXTPROC discardFramebufferEXT = nullptr;
|
||||
|
||||
// GL_EXT_framebuffer_blit
|
||||
PFNGLBLITFRAMEBUFFEREXTPROC blitFramebufferEXT = nullptr;
|
||||
|
||||
// GL_EXT_memory_object
|
||||
PFNGLBUFFERSTORAGEMEMEXTPROC bufferStorageMemEXT = nullptr;
|
||||
PFNGLCREATEMEMORYOBJECTSEXTPROC createMemoryObjectsEXT = nullptr;
|
||||
@@ -790,6 +793,9 @@ class DispatchTableGL : angle::NonCopyable
|
||||
// GL_KHR_parallel_shader_compile
|
||||
PFNGLMAXSHADERCOMPILERTHREADSKHRPROC maxShaderCompilerThreadsKHR = nullptr;
|
||||
|
||||
// GL_NV_framebuffer_blit
|
||||
PFNGLBLITFRAMEBUFFERNVPROC blitFramebufferNV = nullptr;
|
||||
|
||||
// GL_NV_internalformat_sample_query
|
||||
PFNGLGETINTERNALFORMATSAMPLEIVNVPROC getInternalformatSampleivNV = nullptr;
|
||||
|
||||
|
||||
@@ -1933,6 +1933,30 @@ typedef void(INTERNAL_GL_APIENTRY *PFNGLTEXBUFFEREXTPROC)(GLenum, GLenum, GLuint
|
||||
typedef void(
|
||||
INTERNAL_GL_APIENTRY *PFNGLTEXBUFFERRANGEEXTPROC)(GLenum, GLenum, GLuint, GLintptr, GLsizeiptr);
|
||||
|
||||
// GL_EXT_framebuffer_blit
|
||||
typedef void(INTERNAL_GL_APIENTRY *PFNGLBLITFRAMEBUFFEREXTPROC)(GLint srcX0,
|
||||
GLint srcY0,
|
||||
GLint srcX1,
|
||||
GLint srcY1,
|
||||
GLint dstX0,
|
||||
GLint dstY0,
|
||||
GLint dstX1,
|
||||
GLint dstY1,
|
||||
GLbitfield mask,
|
||||
GLenum filter);
|
||||
|
||||
// GL_NV_framebuffer_blit
|
||||
typedef void(INTERNAL_GL_APIENTRY *PFNGLBLITFRAMEBUFFERNVPROC)(GLint srcX0,
|
||||
GLint srcY0,
|
||||
GLint srcX1,
|
||||
GLint srcY1,
|
||||
GLint dstX0,
|
||||
GLint dstY0,
|
||||
GLint dstX1,
|
||||
GLint dstY1,
|
||||
GLbitfield mask,
|
||||
GLenum filter);
|
||||
|
||||
} // namespace rx
|
||||
|
||||
#endif // LIBANGLE_RENDERER_GL_FUNCTIONSGLTYPEDEFS_H_
|
||||
|
||||
@@ -19,6 +19,8 @@ os.chdir(os.path.dirname(os.path.abspath(sys.argv[0])))
|
||||
sys.path.append('..')
|
||||
import angle_format
|
||||
|
||||
generation_year = 2020 # Hard-code year to prevent yearly changes.
|
||||
|
||||
|
||||
def safe_append(the_dict, key, element):
|
||||
if key not in the_dict:
|
||||
@@ -410,7 +412,7 @@ def main():
|
||||
dispatch_table_header = dispatch_table_header_template.format(
|
||||
script_name=os.path.basename(sys.argv[0]),
|
||||
data_source_name=data_source_name,
|
||||
year=date.today().year,
|
||||
year=generation_year,
|
||||
file_name=dispatch_header_path,
|
||||
table_data="\n\n".join(table_data))
|
||||
|
||||
@@ -443,7 +445,7 @@ def main():
|
||||
dispatch_table_source = dispatch_table_source_template.format(
|
||||
script_name=os.path.basename(sys.argv[0]),
|
||||
data_source_name=data_source_name,
|
||||
year=date.today().year,
|
||||
year=generation_year,
|
||||
file_name=dispatch_source_path,
|
||||
gl_data="\n\n".join(gl_data),
|
||||
gl_extensions_data="\n\n".join(gl_extensions_data),
|
||||
@@ -490,7 +492,7 @@ def main():
|
||||
null_functions_header = null_functions_header_template.format(
|
||||
script_name=os.path.basename(sys.argv[0]),
|
||||
data_source_name=data_source_name,
|
||||
year=date.today().year,
|
||||
year=generation_year,
|
||||
file_name=null_functions_header_path,
|
||||
table_data="\n".join(null_decls))
|
||||
|
||||
@@ -500,7 +502,7 @@ def main():
|
||||
null_functions_source = null_functions_source_template.format(
|
||||
script_name=os.path.basename(sys.argv[0]),
|
||||
data_source_name=data_source_name,
|
||||
year=date.today().year,
|
||||
year=generation_year,
|
||||
file_name=null_functions_source_path,
|
||||
table_data="\n\n".join(null_stubs))
|
||||
|
||||
|
||||
@@ -844,5 +844,15 @@
|
||||
[
|
||||
"TexBufferEXT",
|
||||
"TexBufferRangeEXT"
|
||||
],
|
||||
|
||||
"GL_EXT_framebuffer_blit":
|
||||
[
|
||||
"BlitFramebufferEXT"
|
||||
],
|
||||
|
||||
"GL_NV_framebuffer_blit":
|
||||
[
|
||||
"BlitFramebufferNV"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -149,6 +149,30 @@ void INTERNAL_GL_APIENTRY glBlitFramebufferNULL(GLint srcX0,
|
||||
GLenum filter)
|
||||
{}
|
||||
|
||||
void INTERNAL_GL_APIENTRY glBlitFramebufferEXTNULL(GLint srcX0,
|
||||
GLint srcY0,
|
||||
GLint srcX1,
|
||||
GLint srcY1,
|
||||
GLint dstX0,
|
||||
GLint dstY0,
|
||||
GLint dstX1,
|
||||
GLint dstY1,
|
||||
GLbitfield mask,
|
||||
GLenum filter)
|
||||
{}
|
||||
|
||||
void INTERNAL_GL_APIENTRY glBlitFramebufferNVNULL(GLint srcX0,
|
||||
GLint srcY0,
|
||||
GLint srcX1,
|
||||
GLint srcY1,
|
||||
GLint dstX0,
|
||||
GLint dstY0,
|
||||
GLint dstX1,
|
||||
GLint dstY1,
|
||||
GLbitfield mask,
|
||||
GLenum filter)
|
||||
{}
|
||||
|
||||
void INTERNAL_GL_APIENTRY glBlitNamedFramebufferNULL(GLuint readFramebuffer,
|
||||
GLuint drawFramebuffer,
|
||||
GLint srcX0,
|
||||
|
||||
@@ -104,6 +104,26 @@ void INTERNAL_GL_APIENTRY glBlitFramebufferNULL(GLint srcX0,
|
||||
GLint dstY1,
|
||||
GLbitfield mask,
|
||||
GLenum filter);
|
||||
void INTERNAL_GL_APIENTRY glBlitFramebufferEXTNULL(GLint srcX0,
|
||||
GLint srcY0,
|
||||
GLint srcX1,
|
||||
GLint srcY1,
|
||||
GLint dstX0,
|
||||
GLint dstY0,
|
||||
GLint dstX1,
|
||||
GLint dstY1,
|
||||
GLbitfield mask,
|
||||
GLenum filter);
|
||||
void INTERNAL_GL_APIENTRY glBlitFramebufferNVNULL(GLint srcX0,
|
||||
GLint srcY0,
|
||||
GLint srcX1,
|
||||
GLint srcY1,
|
||||
GLint dstX0,
|
||||
GLint dstY0,
|
||||
GLint dstX1,
|
||||
GLint dstY1,
|
||||
GLbitfield mask,
|
||||
GLenum filter);
|
||||
void INTERNAL_GL_APIENTRY glBlitNamedFramebufferNULL(GLuint readFramebuffer,
|
||||
GLuint drawFramebuffer,
|
||||
GLint srcX0,
|
||||
|
||||
Reference in New Issue
Block a user