GLES: Small cleanups

Scissor the stencil readback to the region actually being read back - latent,
every caller passes a zero origin today.

Remove a DecodeVerts call that can never do anything: both branches above it
have already advanced decodeVertsCounter_ to numDrawVerts_. Worse than useless,
since in the non-skinning branch the vertices went to the push buffer, so
decoded_ doesn't hold them.
This commit is contained in:
Henrik Rydgård committed 2026-09-04 10:41:31 -06:00
1 parent 78692deca2
commit ac016201dc
2 files changed
+3 -2

No files matched your search

-1
View File
@@ -292,7 +292,6 @@ void DrawEngineGLES::Flush() {
int vertexCount;
int maxIndex;
bool useElements;
DecodeVerts(dec_, decoded_);
DecodeIndsAndGetData(&prim, &vertexCount, &maxIndex, &useElements, false);
gpuStats.perFrame.numVertsDrawn += vertexCount;
+3 -1
View File
@@ -136,7 +136,9 @@ bool FramebufferManagerGLES::ReadbackStencilbuffer(Draw::Framebuffer *fbo, int x
draw_->BindSamplerStates(TEX_SLOT_PSP_TEXTURE, 1, &stencilReadbackSampler_);
// We must bind the program after starting the render pass.
draw_->SetScissorRect(0, 0, w, h);
// Note: scissor to the region we're about to read back, not to (0, 0, w, h) - every caller
// passes (0, 0) today, but with a nonzero origin the copy below would read scissored-away pixels.
draw_->SetScissorRect(x, y, w, h);
draw_->BindPipeline(stencilReadbackPipeline_);
// Fullscreen triangle coordinates.