Show the stencil buffer properlyish in ge debugger.
This commit is contained in:
parent
3e7f7e9abd
commit
3af88b1e4e
4 changed files with 7 additions and 2 deletions
|
@ -38,9 +38,10 @@ enum GPUDebugBufferFormat {
|
||||||
GPU_DBG_FORMAT_8888 = 3,
|
GPU_DBG_FORMAT_8888 = 3,
|
||||||
GPU_DBG_FORMAT_INVALID = 0xFF,
|
GPU_DBG_FORMAT_INVALID = 0xFF,
|
||||||
|
|
||||||
// These don't, they're for depth buffers.
|
// These don't, they're for depth/stencil buffers.
|
||||||
GPU_DBG_FORMAT_FLOAT = 0x10,
|
GPU_DBG_FORMAT_FLOAT = 0x10,
|
||||||
GPU_DBG_FORMAT_16BIT = 0x11,
|
GPU_DBG_FORMAT_16BIT = 0x11,
|
||||||
|
GPU_DBG_FORMAT_8BIT = 0x12,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GPUDebugBuffer {
|
struct GPUDebugBuffer {
|
||||||
|
|
|
@ -1478,7 +1478,7 @@ bool FramebufferManager::GetCurrentStencilbuffer(GPUDebugBuffer &buffer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef USING_GLES2
|
#ifndef USING_GLES2
|
||||||
buffer.Allocate(vfb->renderWidth, vfb->renderHeight, GPU_DBG_FORMAT_16BIT, true);
|
buffer.Allocate(vfb->renderWidth, vfb->renderHeight, GPU_DBG_FORMAT_8BIT, true);
|
||||||
if (vfb->fbo)
|
if (vfb->fbo)
|
||||||
fbo_bind_for_read(vfb->fbo);
|
fbo_bind_for_read(vfb->fbo);
|
||||||
glReadBuffer(GL_STENCIL_ATTACHMENT);
|
glReadBuffer(GL_STENCIL_ATTACHMENT);
|
||||||
|
|
|
@ -227,6 +227,9 @@ void SimpleGLWindow::Draw(u8 *data, int w, int h, bool flipped, Format fmt) {
|
||||||
} else if (fmt == FORMAT_16BIT) {
|
} else if (fmt == FORMAT_16BIT) {
|
||||||
glfmt = GL_UNSIGNED_SHORT;
|
glfmt = GL_UNSIGNED_SHORT;
|
||||||
components = GL_RED;
|
components = GL_RED;
|
||||||
|
} else if (fmt == FORMAT_8BIT) {
|
||||||
|
glfmt = GL_UNSIGNED_BYTE;
|
||||||
|
components = GL_RED;
|
||||||
} else {
|
} else {
|
||||||
_dbg_assert_msg_(COMMON, false, "Invalid SimpleGLWindow format.");
|
_dbg_assert_msg_(COMMON, false, "Invalid SimpleGLWindow format.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@ struct SimpleGLWindow {
|
||||||
|
|
||||||
FORMAT_FLOAT = 0x10,
|
FORMAT_FLOAT = 0x10,
|
||||||
FORMAT_16BIT = 0x11,
|
FORMAT_16BIT = 0x11,
|
||||||
|
FORMAT_8BIT = 0x12,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Flags {
|
enum Flags {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue