Skip to content

Commit

Permalink
Assorted warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Nov 28, 2024
1 parent dc89b6a commit 0e6fc8e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 14 deletions.
1 change: 0 additions & 1 deletion Common/Net/HTTPNaettRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class HTTPSRequest : public Request {
bool completed_ = false;
bool failed_ = false;
bool cancelled_ = false;
bool joined_ = false;

// Naett state
naettReq *req_ = nullptr;
Expand Down
1 change: 1 addition & 0 deletions Core/MIPS/ARM64/Arm64IRCompFPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ void Arm64JitBackend::CompIR_FCvt(IRInst inst) {
case IRRoundMode::FLOOR_3: rm = RoundingMode::ROUND_M; break;
default:
_assert_msg_(false, "Invalid rounding mode for FCvtScaledWS");
return;
}

// Unfortunately, only Z has a direct scaled instruction.
Expand Down
15 changes: 6 additions & 9 deletions GPU/Vulkan/DrawEngineVulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,14 @@ void DrawEngineVulkan::DoFlush() {
}
bool useHWTransform = CanUseHardwareTransform(prim) && provokingVertexOk;

uint32_t ibOffset;
uint32_t vbOffset;

// The optimization to avoid indexing isn't really worth it on Vulkan since it means creating more pipelines.
// This could be avoided with the new dynamic state extensions, but not available enough on mobile.
const bool forceIndexed = draw_->GetDeviceCaps().verySlowShaderCompiler;

if (useHWTransform) {
uint32_t vbOffset;

VkBuffer vbuf = VK_NULL_HANDLE;
VkBuffer ibuf = VK_NULL_HANDLE;
if (decOptions_.applySkinInDecode && (lastVType_ & GE_VTYPE_WEIGHT_MASK)) {
// If software skinning, we're predecoding into "decoded". So make sure we're done, then push that content.
DecodeVerts(decoded_);
Expand Down Expand Up @@ -371,9 +369,8 @@ void DrawEngineVulkan::DoFlush() {
baseUBOOffset, lightUBOOffset, boneUBOOffset,
};
if (useElements) {
if (!ibuf) {
ibOffset = (uint32_t)pushIndex_->Push(decIndex_, sizeof(uint16_t) * vertexCount, 4, &ibuf);
}
VkBuffer ibuf;
u32 ibOffset = (uint32_t)pushIndex_->Push(decIndex_, sizeof(uint16_t) * vertexCount, 4, &ibuf);
renderManager->DrawIndexed(descSetIndex, ARRAY_SIZE(dynamicUBOOffsets), dynamicUBOOffsets, vbuf, vbOffset, ibuf, ibOffset, vertexCount, 1);
} else {
renderManager->Draw(descSetIndex, ARRAY_SIZE(dynamicUBOOffsets), dynamicUBOOffsets, vbuf, vbOffset, vertexCount);
Expand Down Expand Up @@ -537,8 +534,8 @@ void DrawEngineVulkan::DoFlush() {
PROFILE_THIS_SCOPE("renderman_q");

VkBuffer vbuf, ibuf;
vbOffset = (uint32_t)pushVertex_->Push(result.drawBuffer, numDecodedVerts_ * sizeof(TransformedVertex), 4, &vbuf);
ibOffset = (uint32_t)pushIndex_->Push(inds, sizeof(short) * result.drawNumTrans, 4, &ibuf);
u32 vbOffset = (uint32_t)pushVertex_->Push(result.drawBuffer, numDecodedVerts_ * sizeof(TransformedVertex), 4, &vbuf);
u32 ibOffset = (uint32_t)pushIndex_->Push(inds, sizeof(short) * result.drawNumTrans, 4, &ibuf);
renderManager->DrawIndexed(descSetIndex, ARRAY_SIZE(dynamicUBOOffsets), dynamicUBOOffsets, vbuf, vbOffset, ibuf, ibOffset, result.drawNumTrans, 1);
} else if (result.action == SW_CLEAR) {
// Note: we won't get here if the clear is alpha but not color, or color but not alpha.
Expand Down
1 change: 0 additions & 1 deletion UI/CwCheatScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,4 @@ class CwCheatScreen : public UIDialogScreenWithGameBackground {
std::string gameID_;
int fileCheckCounter_ = 0;
uint64_t fileCheckHash_ = 0;
bool enableAllFlag_ = false;
};
2 changes: 1 addition & 1 deletion UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1905,7 +1905,7 @@ void DeveloperToolsScreen::CreateViews() {
static const char *framerateModes[] = { "Default", "Request 60Hz", "Force 60Hz" };
PopupMultiChoice *framerateMode = list->Add(new PopupMultiChoice(&g_Config.iDisplayFramerateMode, gr->T("Framerate mode"), framerateModes, 0, ARRAY_SIZE(framerateModes), I18NCat::GRAPHICS, screenManager()));
framerateMode->SetEnabledFunc([]() { return System_GetPropertyInt(SYSPROP_SYSTEMVERSION) >= 30; });
framerateMode->OnChoice.Add([this](UI::EventParams &e) {
framerateMode->OnChoice.Add([](UI::EventParams &e) {
System_Notify(SystemNotification::FORCE_RECREATE_ACTIVITY);
return UI::EVENT_DONE;
});
Expand Down
2 changes: 1 addition & 1 deletion UI/ImDebugger/ImDebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ void DrawAudioDecodersView(ImConfig &cfg) {
ImGui::TableNextColumn();
ImGui::Text("%d", iter.second->Channels);
ImGui::TableNextColumn();
ImGui::Text("%d", iter.second->startPos);
ImGui::Text("%d", (int)iter.second->startPos);
}
ImGui::EndTable();
}
Expand Down
1 change: 0 additions & 1 deletion UI/TiltAnalogSettingsScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class TiltAnalogSettingsScreen : public UIDialogScreenWithGameBackground {

Lin::Vec3 down_{};
JoystickHistoryView *tilt_ = nullptr;
GamepadView *gpView_ = nullptr;
};

extern const char *g_tiltTypes[];
Expand Down

0 comments on commit 0e6fc8e

Please sign in to comment.