|
@@ -3032,50 +3032,54 @@ namespace bgfx { namespace d3d11
|
|
|
{
|
|
{
|
|
|
const uint32_t maxTextureSamplers = g_caps.limits.maxTextureSamplers;
|
|
const uint32_t maxTextureSamplers = g_caps.limits.maxTextureSamplers;
|
|
|
|
|
|
|
|
|
|
+ ID3D11DeviceContext* deviceCtx = m_deviceCtx;
|
|
|
|
|
+
|
|
|
// vertex texture fetch not supported on 9_1 through 9_3
|
|
// vertex texture fetch not supported on 9_1 through 9_3
|
|
|
if (m_featureLevel > D3D_FEATURE_LEVEL_9_3)
|
|
if (m_featureLevel > D3D_FEATURE_LEVEL_9_3)
|
|
|
{
|
|
{
|
|
|
- m_deviceCtx->VSSetShaderResources(0, maxTextureSamplers, s_zero.m_srv);
|
|
|
|
|
- m_deviceCtx->VSSetSamplers(0, maxTextureSamplers, s_zero.m_sampler);
|
|
|
|
|
|
|
+ deviceCtx->VSSetShaderResources(0, maxTextureSamplers, s_zero.m_srv);
|
|
|
|
|
+ deviceCtx->VSSetSamplers(0, maxTextureSamplers, s_zero.m_sampler);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (m_featureLevel > D3D_FEATURE_LEVEL_11_0)
|
|
if (m_featureLevel > D3D_FEATURE_LEVEL_11_0)
|
|
|
{
|
|
{
|
|
|
- m_deviceCtx->OMSetRenderTargetsAndUnorderedAccessViews(
|
|
|
|
|
- D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL
|
|
|
|
|
- , NULL
|
|
|
|
|
- , NULL
|
|
|
|
|
- , 16
|
|
|
|
|
- , maxTextureSamplers
|
|
|
|
|
- , s_zero.m_uav
|
|
|
|
|
- , NULL
|
|
|
|
|
|
|
+ deviceCtx->OMSetRenderTargetsAndUnorderedAccessViews(
|
|
|
|
|
+ D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL
|
|
|
|
|
+ , NULL
|
|
|
|
|
+ , NULL
|
|
|
|
|
+ , 16
|
|
|
|
|
+ , maxTextureSamplers
|
|
|
|
|
+ , s_zero.m_uav
|
|
|
|
|
+ , NULL
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- m_deviceCtx->PSSetShaderResources(0, maxTextureSamplers, s_zero.m_srv);
|
|
|
|
|
- m_deviceCtx->PSSetSamplers(0, maxTextureSamplers, s_zero.m_sampler);
|
|
|
|
|
|
|
+ deviceCtx->PSSetShaderResources(0, maxTextureSamplers, s_zero.m_srv);
|
|
|
|
|
+ deviceCtx->PSSetSamplers(0, maxTextureSamplers, s_zero.m_sampler);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void commitTextureStage()
|
|
void commitTextureStage()
|
|
|
{
|
|
{
|
|
|
- if (BX_ENABLED(BGFX_CONFIG_DEBUG))
|
|
|
|
|
|
|
+ if (BX_ENABLED(BGFX_CONFIG_DEBUG) )
|
|
|
{
|
|
{
|
|
|
quietValidation();
|
|
quietValidation();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const uint32_t maxTextureSamplers = g_caps.limits.maxTextureSamplers;
|
|
const uint32_t maxTextureSamplers = g_caps.limits.maxTextureSamplers;
|
|
|
|
|
|
|
|
|
|
+ ID3D11DeviceContext* deviceCtx = m_deviceCtx;
|
|
|
|
|
+
|
|
|
// vertex texture fetch not supported on 9_1 through 9_3
|
|
// vertex texture fetch not supported on 9_1 through 9_3
|
|
|
if (m_featureLevel > D3D_FEATURE_LEVEL_9_3)
|
|
if (m_featureLevel > D3D_FEATURE_LEVEL_9_3)
|
|
|
{
|
|
{
|
|
|
- m_deviceCtx->VSSetShaderResources(0, maxTextureSamplers, m_textureStage.m_srv);
|
|
|
|
|
- m_deviceCtx->VSSetSamplers(0, maxTextureSamplers, m_textureStage.m_sampler);
|
|
|
|
|
|
|
+ deviceCtx->VSSetShaderResources(0, maxTextureSamplers, m_textureStage.m_srv);
|
|
|
|
|
+ deviceCtx->VSSetSamplers(0, maxTextureSamplers, m_textureStage.m_sampler);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (m_featureLevel > D3D_FEATURE_LEVEL_11_0)
|
|
if (m_featureLevel > D3D_FEATURE_LEVEL_11_0)
|
|
|
{
|
|
{
|
|
|
- m_deviceCtx->OMSetRenderTargetsAndUnorderedAccessViews(
|
|
|
|
|
- D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL
|
|
|
|
|
|
|
+ deviceCtx->OMSetRenderTargetsAndUnorderedAccessViews(
|
|
|
|
|
+ D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL
|
|
|
, NULL
|
|
, NULL
|
|
|
, NULL
|
|
, NULL
|
|
|
, 16
|
|
, 16
|
|
@@ -3085,8 +3089,8 @@ namespace bgfx { namespace d3d11
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- m_deviceCtx->PSSetShaderResources(0, maxTextureSamplers, m_textureStage.m_srv);
|
|
|
|
|
- m_deviceCtx->PSSetSamplers(0, maxTextureSamplers, m_textureStage.m_sampler);
|
|
|
|
|
|
|
+ deviceCtx->PSSetShaderResources(0, maxTextureSamplers, m_textureStage.m_srv);
|
|
|
|
|
+ deviceCtx->PSSetSamplers(0, maxTextureSamplers, m_textureStage.m_sampler);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void invalidateTextureStage()
|
|
void invalidateTextureStage()
|