From 35afe5ef45752f900e14344b0c1bbc6b5e4ca29b Mon Sep 17 00:00:00 2001 From: zilmar Date: Tue, 8 Aug 2017 22:21:56 +1000 Subject: [PATCH] [video] change GrLfbInfo_t to gfxLfbInfo_t --- Source/Project64-video/Main.cpp | 4 ++-- Source/Project64-video/Renderer/OGLESglitchmain.cpp | 2 +- Source/Project64-video/Renderer/OGLglitchmain.cpp | 2 +- Source/Project64-video/Renderer/Renderer.h | 2 +- Source/Project64-video/Renderer/types.h | 8 ++++++++ Source/Project64-video/rdp.cpp | 4 ++-- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Source/Project64-video/Main.cpp b/Source/Project64-video/Main.cpp index edc4af523..a89c8511a 100644 --- a/Source/Project64-video/Main.cpp +++ b/Source/Project64-video/Main.cpp @@ -1271,8 +1271,8 @@ void newSwapBuffers() const uint32_t image_width = g_scr_res_x - offset_x * 2; const uint32_t image_height = g_scr_res_y - offset_y * 2; - GrLfbInfo_t info; - info.size = sizeof(GrLfbInfo_t); + gfxLfbInfo_t info; + info.size = sizeof(gfxLfbInfo_t); if (gfxLfbLock(GFX_LFB_READ_ONLY, GFX_BUFFER_BACKBUFFER, GFX_LFBWRITEMODE_565, GFX_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { AUTO_PTR ssimg_buffer(new uint8_t[image_width * image_height * 3]); diff --git a/Source/Project64-video/Renderer/OGLESglitchmain.cpp b/Source/Project64-video/Renderer/OGLESglitchmain.cpp index 0b228909f..1300c575c 100644 --- a/Source/Project64-video/Renderer/OGLESglitchmain.cpp +++ b/Source/Project64-video/Renderer/OGLESglitchmain.cpp @@ -1324,7 +1324,7 @@ void gfxBufferSwap(uint32_t swap_interval) } // frame buffer -bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, GrLfbInfo_t *info) +bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, gfxLfbInfo_t *info) { WriteTrace(TraceGlitch, TraceDebug, "type: %d buffer: %d writeMode: %d origin: %d pixelPipeline: %d", type, buffer, writeMode, origin, pixelPipeline); if (type == GFX_LFB_WRITE_ONLY) diff --git a/Source/Project64-video/Renderer/OGLglitchmain.cpp b/Source/Project64-video/Renderer/OGLglitchmain.cpp index 339d68cd4..8bd096b1f 100644 --- a/Source/Project64-video/Renderer/OGLglitchmain.cpp +++ b/Source/Project64-video/Renderer/OGLglitchmain.cpp @@ -1604,7 +1604,7 @@ void gfxBufferSwap(uint32_t swap_interval) } // frame buffer -bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, GrLfbInfo_t *info) +bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, gfxLfbInfo_t *info) { WriteTrace(TraceGlitch, TraceDebug, "type: %d buffer: %d writeMode: %d origin: %d pixelPipeline: %d", type, buffer, writeMode, origin, pixelPipeline); if (type == GFX_LFB_WRITE_ONLY) diff --git a/Source/Project64-video/Renderer/Renderer.h b/Source/Project64-video/Renderer/Renderer.h index 816dc80c2..926f1c4a4 100644 --- a/Source/Project64-video/Renderer/Renderer.h +++ b/Source/Project64-video/Renderer/Renderer.h @@ -57,7 +57,7 @@ uint32_t gfxGet(uint32_t pname, uint32_t plength, FxI32 *params); void gfxRenderBuffer(gfxBuffer_t buffer); void gfxBufferClear(gfxColor_t color, gfxAlpha_t alpha, uint32_t depth); void gfxBufferSwap(uint32_t swap_interval); -bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, GrLfbInfo_t *info); +bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, gfxLfbInfo_t *info); bool gfxLfbUnlock(gfxLock_t type, gfxBuffer_t buffer); bool gfxLfbReadRegion(gfxBuffer_t src_buffer, uint32_t src_x, uint32_t src_y, uint32_t src_width, uint32_t src_height, uint32_t dst_stride, void *dst_data); bool gfxLfbWriteRegion(gfxBuffer_t dst_buffer, uint32_t dst_x, uint32_t dst_y, GrLfbSrcFmt_t src_format, uint32_t src_width, uint32_t src_height, bool pixelPipeline, FxI32 src_stride, void *src_data); diff --git a/Source/Project64-video/Renderer/types.h b/Source/Project64-video/Renderer/types.h index 1aa8a7aa7..d1ae5f3c7 100644 --- a/Source/Project64-video/Renderer/types.h +++ b/Source/Project64-video/Renderer/types.h @@ -327,3 +327,11 @@ typedef struct gfxTextureFormat_t format; void *data; } gfxTexInfo; + +typedef struct { + int32_t size; + void *lfbPtr; + uint32_t strideInBytes; + gfxLfbWriteMode_t writeMode; + gfxOriginLocation_t origin; +} gfxLfbInfo_t; diff --git a/Source/Project64-video/rdp.cpp b/Source/Project64-video/rdp.cpp index 20c851fa8..7dc9283b6 100644 --- a/Source/Project64-video/rdp.cpp +++ b/Source/Project64-video/rdp.cpp @@ -660,8 +660,8 @@ static void CopyFrameBuffer(gfxBuffer_t buffer = GFX_BUFFER_BACKBUFFER) float scale_y = (g_scr_res_y - rdp.offset_y*2.0f) / maxval(height, rdp.vi_height); WriteTrace(TraceRDP, TraceDebug, "width: %d, height: %d, ul_y: %d, lr_y: %d, scale_x: %f, scale_y: %f, ci_width: %d, ci_height: %d", width, height, rdp.ci_upper_bound, rdp.ci_lower_bound, scale_x, scale_y, rdp.ci_width, rdp.ci_height); - GrLfbInfo_t info; - info.size = sizeof(GrLfbInfo_t); + gfxLfbInfo_t info; + info.size = sizeof(gfxLfbInfo_t); if (gfxLfbLock(GFX_LFB_READ_ONLY, buffer,