mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
Removed code for g_gfxPixelFormat/gfxSetPixelFormat and use hard-coded constant instead, since changing this value has no affect (even when changing g_gfx_BufferInitData.format).
This commit is contained in:
parent
49bea43cce
commit
3a8a9d7c26
@ -34,8 +34,6 @@ static GfxMode g_gfxMode = GfxMode_LinearDouble;
|
||||
|
||||
static u8 *g_gfxFramebufLinear;
|
||||
|
||||
static s32 g_gfxPixelFormat = 0;
|
||||
|
||||
size_t g_gfx_framebuf_width=0, g_gfx_framebuf_aligned_width=0;
|
||||
size_t g_gfx_framebuf_height=0, g_gfx_framebuf_aligned_height=0;
|
||||
size_t g_gfx_framebuf_display_width=0, g_gfx_framebuf_display_height=0;
|
||||
@ -138,7 +136,7 @@ static Result _gfxDequeueBuffer(void) {
|
||||
|
||||
memcpy(&tmp_fence, fence, sizeof(bufferProducerFence));//Offical sw waits on the fence from the previous DequeueBuffer call. Using the fence from the current DequeueBuffer call results in nvgfxEventWait() failing.
|
||||
|
||||
rc = bufferProducerDequeueBuffer(async, g_gfx_framebuf_width, g_gfx_framebuf_height, g_gfxPixelFormat, 0x300, &g_gfxCurrentProducerBuffer, fence);
|
||||
rc = bufferProducerDequeueBuffer(async, g_gfx_framebuf_width, g_gfx_framebuf_height, 0, 0x300, &g_gfxCurrentProducerBuffer, fence);
|
||||
|
||||
//Only run nvgfxEventWait when the fence is valid and the id is not NO_FENCE.
|
||||
if (R_SUCCEEDED(rc) && tmp_fence.is_valid && tmp_fence.nv_fences[0].id!=0xffffffff) rc = nvgfxEventWait(tmp_fence.nv_fences[0].id, tmp_fence.nv_fences[0].value, -1);
|
||||
@ -183,7 +181,6 @@ static Result _gfxInit(ViServiceType servicetype, const char *DisplayName, u32 L
|
||||
|
||||
g_gfx_drawflip = true;
|
||||
g_gfxQueueBufferData.transform = NATIVE_WINDOW_TRANSFORM_FLIP_V;
|
||||
g_gfxPixelFormat = 0;
|
||||
|
||||
memset(g_gfx_ProducerSlotsRequested, 0, sizeof(g_gfx_ProducerSlotsRequested));
|
||||
memset(&g_gfx_DequeueBuffer_fence, 0, sizeof(g_gfx_DequeueBuffer_fence));
|
||||
@ -554,10 +551,6 @@ void gfxConfigureTransform(u32 transform) {
|
||||
g_gfxQueueBufferData.transform = transform;
|
||||
}
|
||||
|
||||
/*void gfxSetPixelFormat(s32 format) {
|
||||
g_gfxPixelFormat = format;
|
||||
}*/
|
||||
|
||||
void gfxFlushBuffers(void) {
|
||||
u32 *actual_framebuf = (u32*)&g_gfxFramebuf[g_gfxCurrentBuffer*g_gfx_singleframebuf_size];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user