Remove some uses of gfxCtx_

This commit is contained in:
Henrik Rydgård 2023-02-25 14:59:14 +01:00
parent 59236dc71c
commit b6846646af
3 changed files with 5 additions and 7 deletions

View file

@ -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() {

View file

@ -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() {

View file

@ -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;
}