Fix some compiler warnings (#416)

This commit is contained in:
Tillsunset 2022-10-26 07:47:44 -05:00 committed by GitHub
parent 3869b47c35
commit 9ebbfb3ae2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 9 deletions

View File

@ -64,8 +64,8 @@ struct LatteGPUState_t
{ {
bool isEnabled; bool isEnabled;
MPTR physPtr; MPTR physPtr;
volatile uint32 flipRequestCount; std::atomic<uint32> flipRequestCount;
volatile uint32 flipExecuteCount; std::atomic<uint32> flipExecuteCount;
}screen[2]; }screen[2];
}osScreen; }osScreen;
}; };

View File

@ -78,7 +78,7 @@ bool LatteHandleOSScreen_TV()
LatteRenderTarget_copyToBackbuffer(osScreenTVTex[bufferIndexTV]->baseTexture->baseView, false); LatteRenderTarget_copyToBackbuffer(osScreenTVTex[bufferIndexTV]->baseTexture->baseView, false);
if (LatteGPUState.osScreen.screen[0].flipExecuteCount != LatteGPUState.osScreen.screen[0].flipRequestCount) if (LatteGPUState.osScreen.screen[0].flipExecuteCount != LatteGPUState.osScreen.screen[0].flipRequestCount)
LatteGPUState.osScreen.screen[0].flipExecuteCount = LatteGPUState.osScreen.screen[0].flipRequestCount; LatteGPUState.osScreen.screen[0].flipExecuteCount.store(LatteGPUState.osScreen.screen[0].flipRequestCount);
return true; return true;
} }
@ -101,7 +101,7 @@ bool LatteHandleOSScreen_DRC()
LatteRenderTarget_copyToBackbuffer(osScreenDRCTex[bufferIndexDRC]->baseTexture->baseView, true); LatteRenderTarget_copyToBackbuffer(osScreenDRCTex[bufferIndexDRC]->baseTexture->baseView, true);
if (LatteGPUState.osScreen.screen[1].flipExecuteCount != LatteGPUState.osScreen.screen[1].flipRequestCount) if (LatteGPUState.osScreen.screen[1].flipExecuteCount != LatteGPUState.osScreen.screen[1].flipRequestCount)
LatteGPUState.osScreen.screen[1].flipExecuteCount = LatteGPUState.osScreen.screen[1].flipRequestCount; LatteGPUState.osScreen.screen[1].flipExecuteCount.store(LatteGPUState.osScreen.screen[1].flipRequestCount);
return true; return true;
} }

View File

@ -55,7 +55,7 @@ uint64 VulkanRenderer::draw_calculateGraphicsPipelineHash(const LatteFetchShader
// An alternative would be to use VK_EXT_vertex_input_dynamic_state but it comes with minor overhead // An alternative would be to use VK_EXT_vertex_input_dynamic_state but it comes with minor overhead
// Regardless, the extension is not well supported as of writing this (July 2021, only 10% of GPUs support it on Windows. Nvidia only) // Regardless, the extension is not well supported as of writing this (July 2021, only 10% of GPUs support it on Windows. Nvidia only)
cemu_assert_debug(fetchShader->key == fetchShader->key); // fetch shaders must be layout compatible, but may have different offsets cemu_assert_debug(vertexShader->compatibleFetchShader->key == fetchShader->key); // fetch shaders must be layout compatible, but may have different offsets
uint64 stateHash; uint64 stateHash;
stateHash = draw_calculateMinimalGraphicsPipelineHash(fetchShader, lcr); stateHash = draw_calculateMinimalGraphicsPipelineHash(fetchShader, lcr);

View File

@ -75,7 +75,7 @@ CubebAPI::CubebAPI(cubeb_devid devid, uint32 samplerate, uint32 channels, uint32
output_params.layout = CUBEB_LAYOUT_3F4_LFE; output_params.layout = CUBEB_LAYOUT_3F4_LFE;
break; break;
case 6: case 6:
output_params.layout = CUBEB_LAYOUT_QUAD_LFE | CHANNEL_FRONT_CENTER; output_params.layout = CUBEB_LAYOUT_3F2_LFE_BACK;
break; break;
case 4: case 4:
output_params.layout = CUBEB_LAYOUT_QUAD; output_params.layout = CUBEB_LAYOUT_QUAD;

View File

@ -509,7 +509,7 @@ void CemuUpdateWindow::WorkerThread()
forceLog_printf("applying update error: %s", sys.what()); forceLog_printf("applying update error: %s", sys.what());
} }
if ((counter++ / 10) * 10 == counter) if ((counter++ % 10) == 0)
{ {
auto* event = new wxCommandEvent(wxEVT_PROGRESS); auto* event = new wxCommandEvent(wxEVT_PROGRESS);
event->SetInt(counter); event->SetInt(counter);

View File

@ -207,11 +207,11 @@ namespace ZpIR
// print imports // print imports
printf("Imports:\n"); printf("Imports:\n");
for(auto itr : block->m_imports) for(auto itr : block->m_imports)
printf(" reg: %s sym:0x%lux\n", getRegisterName(block, itr.reg).c_str(), itr.name); printf(" reg: %s sym:0x%llx\n", getRegisterName(block, itr.reg).c_str(), itr.name);
// print exports // print exports
printf("Exports:\n"); printf("Exports:\n");
for (auto itr : block->m_exports) for (auto itr : block->m_exports)
printf(" reg: %s sym:0x%lux\n", getRegisterName(block, itr.reg).c_str(), itr.name); printf(" reg: %s sym:0x%llx\n", getRegisterName(block, itr.reg).c_str(), itr.name);
// print instructions // print instructions
printf("Assembly:\n"); printf("Assembly:\n");
IR::__InsBase* instruction = block->m_instructionFirst; IR::__InsBase* instruction = block->m_instructionFirst;