mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Speculative support for 10-bit backbuffers on GL
This commit is contained in:
@@ -328,6 +328,14 @@ HOOK_EXPORT EGLContext EGLAPIENTRY eglCreateContext_renderdoc_hooked(EGLDisplay
|
||||
// We will set isSRGB when we see the surface.
|
||||
init.isSRGB = 0;
|
||||
|
||||
EGLint rgbSize[3] = {};
|
||||
EGL.GetConfigAttrib(display, config, EGL_RED_SIZE, &rgbSize[0]);
|
||||
EGL.GetConfigAttrib(display, config, EGL_GREEN_SIZE, &rgbSize[1]);
|
||||
EGL.GetConfigAttrib(display, config, EGL_BLUE_SIZE, &rgbSize[2]);
|
||||
|
||||
if(rgbSize[0] == rgbSize[1] && rgbSize[1] == rgbSize[2] && rgbSize[2] == 10)
|
||||
init.colorBits = 10;
|
||||
|
||||
GLWindowingData data;
|
||||
data.egl_dpy = display;
|
||||
data.wnd = 0;
|
||||
|
||||
@@ -741,7 +741,11 @@ void WrappedOpenGL::CreateReplayBackbuffer(const GLInitParams ¶ms, ResourceI
|
||||
|
||||
GLenum colfmt = eGL_RGBA8;
|
||||
|
||||
if(params.colorBits == 32)
|
||||
if(params.colorBits == 64)
|
||||
{
|
||||
colfmt = eGL_RGBA16F;
|
||||
}
|
||||
else if(params.colorBits == 32)
|
||||
{
|
||||
colfmt = params.isSRGB ? eGL_SRGB8_ALPHA8 : eGL_RGBA8;
|
||||
}
|
||||
@@ -759,6 +763,10 @@ void WrappedOpenGL::CreateReplayBackbuffer(const GLInitParams ¶ms, ResourceI
|
||||
else
|
||||
colfmt = eGL_RGB8;
|
||||
}
|
||||
else if(params.colorBits == 10)
|
||||
{
|
||||
colfmt = eGL_RGB10_A2;
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCERR("Unexpected # colour bits: %d", params.colorBits);
|
||||
|
||||
Reference in New Issue
Block a user