From 727c7d2b824913b3ae263243421ea79ca4940eb8 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 9 Mar 2022 11:32:23 -0800 Subject: gfx: restructure render-d3d12.cpp (#2154) * Vulkan: deferred shader compilation and pipeline creation. * Fix 32bit build. * gfx: restructure the code in render-d3d12.cpp * Move `Submitter`. * Fix. * merge with master. * Revert dictionary change in previous PR. Co-authored-by: Yong He --- tools/gfx/d3d11/render-d3d11.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tools/gfx/d3d11/render-d3d11.cpp') diff --git a/tools/gfx/d3d11/render-d3d11.cpp b/tools/gfx/d3d11/render-d3d11.cpp index d7a918a3b..aecadcf46 100644 --- a/tools/gfx/d3d11/render-d3d11.cpp +++ b/tools/gfx/d3d11/render-d3d11.cpp @@ -2071,7 +2071,7 @@ SlangResult SLANG_MCALL createD3D11Device(const IDevice::Desc* desc, IDevice** o return SLANG_OK; } -static void _initSrvDesc(IResource::Type resourceType, const ITextureResource::Desc& textureDesc, DXGI_FORMAT pixelFormat, D3D11_SHADER_RESOURCE_VIEW_DESC& descOut) +static void initSrvDesc(IResource::Type resourceType, const ITextureResource::Desc& textureDesc, DXGI_FORMAT pixelFormat, D3D11_SHADER_RESOURCE_VIEW_DESC& descOut) { // create SRV descOut = D3D11_SHADER_RESOURCE_VIEW_DESC(); @@ -2170,7 +2170,7 @@ D3D11Device::ScopeNVAPI::~ScopeNVAPI() // !!!!!!!!!!!!!!!!!!!!!!!!!!!! Renderer interface !!!!!!!!!!!!!!!!!!!!!!!!!! -static bool _isSupportedNVAPIOp(IUnknown* dev, uint32_t op) +static bool isSupportedNVAPIOp(IUnknown* dev, uint32_t op) { #ifdef GFX_NVAPI { @@ -2347,11 +2347,11 @@ SlangResult D3D11Device::initialize(const Desc& desc) return SLANG_E_NOT_AVAILABLE; } - if (_isSupportedNVAPIOp(m_device, NV_EXTN_OP_UINT64_ATOMIC )) + if (isSupportedNVAPIOp(m_device, NV_EXTN_OP_UINT64_ATOMIC )) { m_features.add("atomic-int64"); } - if (_isSupportedNVAPIOp(m_device, NV_EXTN_OP_FP32_ATOMIC)) + if (isSupportedNVAPIOp(m_device, NV_EXTN_OP_FP32_ATOMIC)) { m_features.add("atomic-float"); } @@ -2548,7 +2548,7 @@ SlangResult D3D11Device::readTextureResource( } } -static D3D11_BIND_FLAG _calcResourceFlag(ResourceState state) +static D3D11_BIND_FLAG calcResourceFlag(ResourceState state) { switch (state) { @@ -2581,7 +2581,7 @@ static int _calcResourceBindFlags(ResourceStateSet allowedStates) { auto state = (ResourceState)i; if (allowedStates.contains(state)) - dstFlags |= _calcResourceFlag(state); + dstFlags |= calcResourceFlag(state); } return dstFlags; } @@ -3000,7 +3000,7 @@ Result D3D11Device::createTextureView(ITextureResource* texture, IResourceView:: case IResourceView::Type::ShaderResource: { D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc; - _initSrvDesc(resourceImpl->getType(), *resourceImpl->getDesc(), D3DUtil::getMapFormat(desc.format), srvDesc); + initSrvDesc(resourceImpl->getType(), *resourceImpl->getDesc(), D3DUtil::getMapFormat(desc.format), srvDesc); ComPtr srv; SLANG_RETURN_ON_FAIL(m_device->CreateShaderResourceView(resourceImpl->m_resource, &srvDesc, srv.writeRef())); -- cgit v1.2.3