mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
Debugger: Fix texture preview in GLES.
Also, fix issues with the first view of a texture in Vulkan / D3D11.
This commit is contained in:
1 parent
bdf7fdc7a3
commit
db0989a9d0
7 files changed
+81
-19
No files matched your search
@@ -947,7 +947,28 @@ void GLQueueRunner::PerformReadback(const GLRStep &pass) {
|
||||
}
|
||||
|
||||
void GLQueueRunner::PerformReadbackImage(const GLRStep &pass) {
|
||||
GLRTexture *tex = pass.readback_image.texture;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, tex->texture);
|
||||
|
||||
CHECK_GL_ERROR_IF_DEBUG();
|
||||
|
||||
int pixelStride = pass.readback_image.srcRect.w;
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 4);
|
||||
|
||||
GLRect2D rect = pass.readback.srcRect;
|
||||
|
||||
int size = 4 * rect.w * rect.h;
|
||||
if (size > readbackBufferSize_) {
|
||||
delete[] readbackBuffer_;
|
||||
readbackBuffer_ = new uint8_t[size];
|
||||
readbackBufferSize_ = size;
|
||||
}
|
||||
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 4);
|
||||
glGetTexImage(GL_TEXTURE_2D, pass.readback_image.mipLevel, GL_RGBA, GL_UNSIGNED_BYTE, readbackBuffer_);
|
||||
|
||||
CHECK_GL_ERROR_IF_DEBUG();
|
||||
}
|
||||
|
||||
void GLQueueRunner::PerformBindFramebufferAsRenderTarget(const GLRStep &pass) {
|
||||
|
||||
Reference in new issue
Block a user