mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-28 19:00:23 +00:00
Add support for 4444/5551/8888 stencil upload.
This commit is contained in:
parent
f6d4be1d49
commit
21c1c635d8
@ -124,8 +124,13 @@ bool FramebufferManager::NotifyStencilUpload(u32 addr, int size) {
|
||||
for (int i = 0; i < passes; ++i) {
|
||||
glsl_bind(stencilUploadProgram_);
|
||||
glUniform1f(u_stencilValue, i * scale);
|
||||
// TODO: 4444, 5551
|
||||
glstate.stencilFunc.set(GL_ALWAYS, i, 0xFF);
|
||||
if (dstBuffer->format == GE_FORMAT_4444) {
|
||||
glstate.stencilFunc.set(GL_ALWAYS, Convert4To8(i), 0xFF);
|
||||
} else if (dstBuffer->format == GE_FORMAT_5551) {
|
||||
glstate.stencilFunc.set(GL_ALWAYS, i ? 0xFF : 0x00, 0xFF);
|
||||
} else if (dstBuffer->format == GE_FORMAT_8888) {
|
||||
glstate.stencilFunc.set(GL_ALWAYS, i, 0xFF);
|
||||
}
|
||||
DrawActiveTexture(0, 0, 0, dstBuffer->width, dstBuffer->height, dstBuffer->width, dstBuffer->height, false, 0.0f, 0.0f, 1.0f, 1.0f, stencilUploadProgram_);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user