Skip to content

Commit 869ba4d

Browse files
committed
Cleanup some inconsistent ID3D types
1 parent 751b232 commit 869ba4d

5 files changed

Lines changed: 10 additions & 9 deletions

File tree

src/Layers/xrRender/SH_RT.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class CRT : public xr_resource_named
3434
ID3DDepthStencilView* pZRT[R__NUM_CONTEXTS]{};
3535
ID3DDepthStencilView* dsv_all{};
3636
xr_vector<ID3DDepthStencilView*> dsv_per_slice;
37-
ID3D11UnorderedAccessView* pUAView{};
37+
ID3DUnorderedAccessView* pUAView{};
3838
#elif defined(USE_OGL)
3939
GLuint pRT{};
4040
GLuint pZRT{};

src/Layers/xrRenderDX11/CommonTypes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ using ID3DShaderResourceView = ID3D11ShaderResourceView;
4747
using ID3DQuery = ID3D11Query;
4848
using ID3DDevice = ID3D11Device;
4949
using ID3DDeviceContext = ID3D11DeviceContext;
50+
using ID3DUnorderedAccessView = ID3D11UnorderedAccessView;
5051

5152
constexpr auto D3D_COMMONSHADER_SAMPLER_SLOT_COUNT = D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT;
5253

src/Layers/xrRenderDX11/dx11ComputeTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ bool ComputeTest::RunComputeShader()
219219
context->CSSetConstantBuffers(0, 1, &s_params_cb);
220220
context->CSSetShaderResources(0, 1, &s_input_srv);
221221

222-
ID3D11UnorderedAccessView* uavs[2] = { s_output_uav, s_counter_uav };
222+
ID3DUnorderedAccessView* uavs[2] = { s_output_uav, s_counter_uav };
223223
context->CSSetUnorderedAccessViews(0, 2, uavs, nullptr);
224224

225225
// Dispatch
@@ -230,8 +230,8 @@ bool ComputeTest::RunComputeShader()
230230
context->Dispatch(num_groups, 1, 1);
231231

232232
// Unbind resources
233-
ID3D11ShaderResourceView* null_srv[1] = { nullptr };
234-
ID3D11UnorderedAccessView* null_uav[2] = { nullptr, nullptr };
233+
ID3DShaderResourceView* null_srv[1] = { nullptr };
234+
ID3DUnorderedAccessView* null_uav[2] = { nullptr, nullptr };
235235
context->CSSetShaderResources(0, 1, null_srv);
236236
context->CSSetUnorderedAccessViews(0, 2, null_uav, nullptr);
237237

src/Layers/xrRenderDX11/dx11DetailManager_Compute.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ void DetailComputeManager::DispatchCulling(CBackend& cmd_list, const Fmatrix& vi
414414
context->CSSetShaderResources(0, 1, &m_gpu.instance_buffer_srv);
415415

416416
// Bind output UAVs
417-
ID3D11UnorderedAccessView* uavs[5] = {
417+
ID3DUnorderedAccessView* uavs[5] = {
418418
m_gpu.visible_indices_uav[0], // still
419419
m_gpu.visible_indices_uav[1], // wave1
420420
m_gpu.visible_indices_uav[2], // wave2
@@ -434,8 +434,8 @@ void DetailComputeManager::DispatchCulling(CBackend& cmd_list, const Fmatrix& vi
434434
// ===========================
435435
// Unbind resources
436436
// ===========================
437-
ID3D11ShaderResourceView* null_srv[1] = { nullptr };
438-
ID3D11UnorderedAccessView* null_uav[5] = { nullptr, nullptr, nullptr, nullptr, nullptr };
437+
ID3DShaderResourceView* null_srv[1] = { nullptr };
438+
ID3DUnorderedAccessView* null_uav[5] = { nullptr, nullptr, nullptr, nullptr, nullptr };
439439
context->CSSetShaderResources(0, 1, null_srv);
440440
context->CSSetUnorderedAccessViews(0, 5, null_uav, nullptr);
441441

src/Layers/xrRenderPC_R4/r4_rendertarget_phase_hdao.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ void CRenderTarget::phase_hdao()
2323

2424
// set the cs shader output
2525
u32 UAVInitialCounts = 1;
26-
ID3D11UnorderedAccessView* uav[1] = {0};
27-
ID3D11ShaderResourceView* srv[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
26+
ID3DUnorderedAccessView* uav[1] = {0};
27+
ID3DShaderResourceView* srv[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
2828
// ID3D11ShaderResourceView* new_srv[2]={rt_ssao_temp1->pTexture->m_pSRView,rt_ssao_temp2->pTexture->m_pSRView};
2929
// HW.pContext->CSSetShaderResources( 0, 2, new_srv );
3030
HW.get_context(CHW::IMM_CTX_ID)->CSSetUnorderedAccessViews(0, 1, &rt_ssao_temp->pUAView, &UAVInitialCounts); // TODO: id

0 commit comments

Comments
 (0)