Show the stencil buffer properlyish in ge debugger.

This commit is contained in:
Unknown W. Brackets 2013-10-06 17:11:42 -07:00
parent 3e7f7e9abd
commit 3af88b1e4e
4 changed files with 7 additions and 2 deletions

View file

@ -38,9 +38,10 @@ enum GPUDebugBufferFormat {
GPU_DBG_FORMAT_8888 = 3,
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_16BIT = 0x11,
GPU_DBG_FORMAT_8BIT = 0x12,
};
struct GPUDebugBuffer {

View file

@ -1478,7 +1478,7 @@ bool FramebufferManager::GetCurrentStencilbuffer(GPUDebugBuffer &buffer) {
}
#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)
fbo_bind_for_read(vfb->fbo);
glReadBuffer(GL_STENCIL_ATTACHMENT);

View file

@ -227,6 +227,9 @@ void SimpleGLWindow::Draw(u8 *data, int w, int h, bool flipped, Format fmt) {
} else if (fmt == FORMAT_16BIT) {
glfmt = GL_UNSIGNED_SHORT;
components = GL_RED;
} else if (fmt == FORMAT_8BIT) {
glfmt = GL_UNSIGNED_BYTE;
components = GL_RED;
} else {
_dbg_assert_msg_(COMMON, false, "Invalid SimpleGLWindow format.");
}

View file

@ -32,6 +32,7 @@ struct SimpleGLWindow {
FORMAT_FLOAT = 0x10,
FORMAT_16BIT = 0x11,
FORMAT_8BIT = 0x12,
};
enum Flags {