mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
Merge pull request #4852 from unknownbrackets/gpu-minor
Always update framebuffer tex sampling params
This commit is contained in:
commit
15b66eaae7
2 files changed
+15
-1
No files matched your search
@@ -835,7 +835,8 @@ void TextureCache::SetTextureFramebuffer(TexCacheEntry *entry)
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
gstate_c.skipDrawReason |= SKIPDRAW_BAD_FB_TEXTURE;
|
||||
}
|
||||
UpdateSamplingParams(*entry, false);
|
||||
// We need to force it, since we may have set it on a texture before attaching.
|
||||
UpdateSamplingParams(*entry, true);
|
||||
gstate_c.curTextureWidth = entry->framebuffer->width;
|
||||
gstate_c.curTextureHeight = entry->framebuffer->height;
|
||||
gstate_c.flipTexture = true;
|
||||
|
||||
@@ -211,6 +211,19 @@ void CGEDebugger::UpdatePrimPreview(u32 op) {
|
||||
glScissor(x, y, fw, fh);
|
||||
BindPreviewProgram(texPreviewProgram);
|
||||
|
||||
// TODO: Probably there's a better way and place to do this.
|
||||
if (indices.empty()) {
|
||||
for (int i = 0; i < count; ++i) {
|
||||
vertices[i].u -= floor(vertices[i].u);
|
||||
vertices[i].v -= floor(vertices[i].v);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < count; ++i) {
|
||||
vertices[indices[i]].u -= floor(vertices[indices[i]].u);
|
||||
vertices[indices[i]].v -= floor(vertices[indices[i]].v);
|
||||
}
|
||||
}
|
||||
|
||||
ortho.setOrtho(0.0, 1.0, 1.0, 0.0, -1.0, 1.0);
|
||||
glUniformMatrix4fv(texPreviewProgram->u_viewproj, 1, GL_FALSE, ortho.getReadPtr());
|
||||
glEnableVertexAttribArray(texPreviewProgram->a_position);
|
||||
|
||||
Reference in new issue
Block a user