mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
glBlitFramebuffer
This commit is contained in:
@@ -144,6 +144,7 @@ enum GLChunkType
|
||||
GEN_FRAMEBUFFERS,
|
||||
FRAMEBUFFER_TEX,
|
||||
BIND_FRAMEBUFFER,
|
||||
BLIT_FRAMEBUFFER,
|
||||
|
||||
BIND_SAMPLER,
|
||||
|
||||
|
||||
@@ -503,6 +503,40 @@ void WrappedOpenGL::glBindFramebuffer(GLenum target, GLuint framebuffer)
|
||||
m_Real.glBindFramebuffer(target, framebuffer);
|
||||
}
|
||||
|
||||
bool WrappedOpenGL::Serialise_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
|
||||
{
|
||||
SERIALISE_ELEMENT(int32_t, sX0, srcX0);
|
||||
SERIALISE_ELEMENT(int32_t, sY0, srcY0);
|
||||
SERIALISE_ELEMENT(int32_t, sX1, srcX1);
|
||||
SERIALISE_ELEMENT(int32_t, sY1, srcY1);
|
||||
SERIALISE_ELEMENT(int32_t, dX0, dstX0);
|
||||
SERIALISE_ELEMENT(int32_t, dY0, dstY0);
|
||||
SERIALISE_ELEMENT(int32_t, dX1, dstX1);
|
||||
SERIALISE_ELEMENT(int32_t, dY1, dstY1);
|
||||
SERIALISE_ELEMENT(uint32_t, msk, mask);
|
||||
SERIALISE_ELEMENT(GLenum, flt, filter);
|
||||
|
||||
if(m_State <= EXECUTING)
|
||||
{
|
||||
m_Real.glBlitFramebuffer(sX0, sY0, sX1, sY1, dX0, dY0, dX1, dY1, msk, flt);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void WrappedOpenGL::glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
|
||||
{
|
||||
if(m_State == WRITING_CAPFRAME)
|
||||
{
|
||||
SCOPED_SERIALISE_CONTEXT(BLIT_FRAMEBUFFER);
|
||||
Serialise_glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
|
||||
|
||||
m_ContextRecord->AddChunk(scope.Get());
|
||||
}
|
||||
|
||||
m_Real.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Debugging annotation
|
||||
|
||||
@@ -101,6 +101,7 @@ const char *GLChunkNames[] =
|
||||
"glGenFramebuffers",
|
||||
"glFramebufferTexture",
|
||||
"glBindFramebuffer",
|
||||
"glBlitFramebuffer",
|
||||
|
||||
"glBindSampler",
|
||||
|
||||
@@ -961,6 +962,9 @@ void WrappedOpenGL::ProcessChunk(uint64_t offset, GLChunkType context)
|
||||
case BIND_FRAMEBUFFER:
|
||||
Serialise_glBindFramebuffer(eGL_UNKNOWN_ENUM, 0);
|
||||
break;
|
||||
case BLIT_FRAMEBUFFER:
|
||||
Serialise_glBlitFramebuffer(0, 0, 0, 0, 0, 0, 0, 0, 0, eGL_UNKNOWN_ENUM);
|
||||
break;
|
||||
|
||||
case BIND_SAMPLER:
|
||||
Serialise_glBindSampler(0, 0);
|
||||
|
||||
@@ -321,6 +321,7 @@ class WrappedOpenGL
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height));
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels));
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glGenerateMipmap(GLenum target));
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter));
|
||||
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params));
|
||||
IMPLEMENT_FUNCTION_SERIALISED(void, glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params));
|
||||
|
||||
@@ -156,6 +156,7 @@ struct GLHookSet
|
||||
PFNGLUNIFORM3FVPROC glUniform3fv;
|
||||
PFNGLUNIFORM4FVPROC glUniform4fv;
|
||||
PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC glDrawArraysInstancedBaseInstance;
|
||||
PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer;
|
||||
// --
|
||||
|
||||
// ++ wgl
|
||||
|
||||
@@ -168,6 +168,7 @@
|
||||
HookExtension(PFNGLUNIFORM3FVPROC, glUniform3fv); \
|
||||
HookExtension(PFNGLUNIFORM4FVPROC, glUniform4fv); \
|
||||
HookExtension(PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC, glDrawArraysInstancedBaseInstance); \
|
||||
HookExtension(PFNGLBLITFRAMEBUFFERPROC, glBlitFramebuffer); \
|
||||
HookExtension(PFNGLBINDTEXTUREPROC, glBindTexture); \
|
||||
HookExtension(PFNGLBLENDFUNCPROC, glBlendFunc); \
|
||||
HookExtension(PFNGLBLENDCOLORPROC, glBlendColor); \
|
||||
@@ -359,6 +360,7 @@
|
||||
HookWrapper3(void, glUniform3fv, GLint, location, GLsizei, count, const GLfloat *, value); \
|
||||
HookWrapper3(void, glUniform4fv, GLint, location, GLsizei, count, const GLfloat *, value); \
|
||||
HookWrapper5(void, glDrawArraysInstancedBaseInstance, GLenum, mode, GLint, first, GLsizei, count, GLsizei, instancecount, GLuint, baseinstance); \
|
||||
HookWrapper10(void, glBlitFramebuffer, GLint, srcX0, GLint, srcY0, GLint, srcX1, GLint, srcY1, GLint, dstX0, GLint, dstY0, GLint, dstX1, GLint, dstY1, GLbitfield, mask, GLenum, filter); \
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user