From b6846646af0e2f4d4c3b85bb01d6a70735aea422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 25 Feb 2023 14:59:14 +0100 Subject: [PATCH] Remove some uses of gfxCtx_ --- GPU/D3D11/GPU_D3D11.cpp | 5 ++--- GPU/Directx9/GPU_DX9.cpp | 6 ++---- GPU/GPUCommon.cpp | 1 + 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/GPU/D3D11/GPU_D3D11.cpp b/GPU/D3D11/GPU_D3D11.cpp index 0d03b6292d..e11d1c8156 100644 --- a/GPU/D3D11/GPU_D3D11.cpp +++ b/GPU/D3D11/GPU_D3D11.cpp @@ -119,10 +119,9 @@ u32 GPU_D3D11::CheckGPUFeatures() const { // Needs to be called on GPU thread, not reporting thread. void GPU_D3D11::BuildReportingInfo() { using namespace Draw; - DrawContext *thin3d = gfxCtx_->GetDrawContext(); - reportingPrimaryInfo_ = thin3d->GetInfoString(InfoField::VENDORSTRING); - reportingFullInfo_ = reportingPrimaryInfo_ + " - " + System_GetProperty(SYSPROP_GPUDRIVER_VERSION) + " - " + thin3d->GetInfoString(InfoField::SHADELANGVERSION); + reportingPrimaryInfo_ = draw_->GetInfoString(InfoField::VENDORSTRING); + reportingFullInfo_ = reportingPrimaryInfo_ + " - " + System_GetProperty(SYSPROP_GPUDRIVER_VERSION) + " - " + draw_->GetInfoString(InfoField::SHADELANGVERSION); } void GPU_D3D11::DeviceLost() { diff --git a/GPU/Directx9/GPU_DX9.cpp b/GPU/Directx9/GPU_DX9.cpp index efe4c11fd0..8569a6639e 100644 --- a/GPU/Directx9/GPU_DX9.cpp +++ b/GPU/Directx9/GPU_DX9.cpp @@ -116,10 +116,8 @@ GPU_DX9::~GPU_DX9() { // Needs to be called on GPU thread, not reporting thread. void GPU_DX9::BuildReportingInfo() { using namespace Draw; - DrawContext *thin3d = gfxCtx_->GetDrawContext(); - - reportingPrimaryInfo_ = thin3d->GetInfoString(InfoField::VENDORSTRING); - reportingFullInfo_ = reportingPrimaryInfo_ + " - " + System_GetProperty(SYSPROP_GPUDRIVER_VERSION) + " - " + thin3d->GetInfoString(InfoField::SHADELANGVERSION); + reportingPrimaryInfo_ = draw_->GetInfoString(InfoField::VENDORSTRING); + reportingFullInfo_ = reportingPrimaryInfo_ + " - " + System_GetProperty(SYSPROP_GPUDRIVER_VERSION) + " - " + draw_->GetInfoString(InfoField::SHADELANGVERSION); } void GPU_DX9::DeviceLost() { diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 2e683d73be..af0d7d7a3d 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -796,6 +796,7 @@ int GPUCommon::GetStack(int index, u32 stackPtr) { } static void CopyMatrix24(u32_le *result, const float *mtx, u32 count, u32 cmdbits) { + // Screams out for simple SIMD, but probably not called often enough to be worth it. for (u32 i = 0; i < count; ++i) { result[i] = toFloat24(mtx[i]) | cmdbits; }