diff --git a/miniwin/src/d3drm/backends/gxm/renderer.cpp b/miniwin/src/d3drm/backends/gxm/renderer.cpp index eb8da497..77c9c77b 100644 --- a/miniwin/src/d3drm/backends/gxm/renderer.cpp +++ b/miniwin/src/d3drm/backends/gxm/renderer.cpp @@ -511,15 +511,15 @@ GXMRenderer::GXMRenderer(DWORD width, DWORD height) vertexStreams[0].indexSource = SCE_GXM_INDEX_SOURCE_INDEX_16BIT; if (SCE_ERR( - sceGxmShaderPatcherCreateVertexProgram, - this->shaderPatcher, - this->mainVertexProgramId, - vertexAttributes, - 3, - vertexStreams, - 1, - &this->mainVertexProgram - )) { + sceGxmShaderPatcherCreateVertexProgram, + this->shaderPatcher, + this->mainVertexProgramId, + vertexAttributes, + 3, + vertexStreams, + 1, + &this->mainVertexProgram + )) { return; } } @@ -1070,7 +1070,6 @@ void GXMRenderer::StartScene() this->sceneStarted = true; this->quadsUsed = 0; - // wait for this uniform buffer to become available this->activeUniformBuffer = (this->activeUniformBuffer + 1) % VITA_GXM_UNIFORM_BUFFER_COUNT; sceGxmNotificationWait(&this->fragmentNotifications[this->activeUniformBuffer]); } @@ -1253,13 +1252,10 @@ void GXMRenderer::Flip() // end scene ++this->fragmentNotifications[this->activeUniformBuffer].value; - ++this->vertexNotifications[this->activeUniformBuffer].value; sceGxmEndScene( this->context, - nullptr, //&this->vertexNotifications[this->activeUniformBuffer], - // nullptr - &this->fragmentNotifications[this->activeUniformBuffer] // wait for fragment processing to finish for this - // buffer, otherwise lighting corrupts + nullptr, + &this->fragmentNotifications[this->activeUniformBuffer] ); sceGxmPadHeartbeat( &this->displayBuffersSurface[this->backBufferIndex], diff --git a/miniwin/src/internal/d3drmrenderer_gxm.h b/miniwin/src/internal/d3drmrenderer_gxm.h index 895a839e..b343e3f3 100644 --- a/miniwin/src/internal/d3drmrenderer_gxm.h +++ b/miniwin/src/internal/d3drmrenderer_gxm.h @@ -17,7 +17,7 @@ DEFINE_GUID(GXM_GUID, 0x682656F3, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x58, 0x4D); #define VITA_GXM_DISPLAY_BUFFER_COUNT 3 -#define VITA_GXM_UNIFORM_BUFFER_COUNT 6 // hacky solution to corruption while drawing next frame, sync not working +#define VITA_GXM_UNIFORM_BUFFER_COUNT 2 struct GXMTextureCacheEntry { IDirect3DRMTexture* texture; @@ -207,7 +207,6 @@ class GXMRenderer : public Direct3DRMRenderer { uint16_t* quadIndices; int quadsUsed = 0; int activeUniformBuffer = 0; - SceGxmNotification vertexNotifications[VITA_GXM_UNIFORM_BUFFER_COUNT]; SceGxmNotification fragmentNotifications[VITA_GXM_UNIFORM_BUFFER_COUNT]; SDL_Gamepad* gamepad;