mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 04:29:15 +01:00
[d3d11] Implemented OMSetRenderTargetsAndUnorderedAccessViews
Note that this does *not* properly implement UAV rendering in the backend yet. For that, we need to add memory barriers.
This commit is contained in:
parent
38fa9ce9c9
commit
672675ba78
@ -1567,8 +1567,10 @@ namespace dxvk {
|
||||
|
||||
m_state.om.depthStencilView = static_cast<D3D11DepthStencilView*>(pDepthStencilView);
|
||||
|
||||
// TODO unbind overlapping shader resource views
|
||||
|
||||
// NOTE According to the Microsoft docs, we are supposed to
|
||||
// unbind overlapping shader resource views. Since this comes
|
||||
// with a large performance penalty we'll ignore this until an
|
||||
// application actually relies on this behaviour.
|
||||
Rc<DxvkFramebuffer> framebuffer = nullptr;
|
||||
|
||||
if (ppRenderTargetViews != nullptr || pDepthStencilView != nullptr) {
|
||||
@ -1602,7 +1604,25 @@ namespace dxvk {
|
||||
UINT NumUAVs,
|
||||
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews,
|
||||
const UINT* pUAVInitialCounts) {
|
||||
Logger::err("D3D11DeviceContext::OMSetRenderTargetsAndUnorderedAccessViews: Not implemented");
|
||||
if (NumRTVs != D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL)
|
||||
OMSetRenderTargets(NumRTVs, ppRenderTargetViews, pDepthStencilView);
|
||||
|
||||
if (NumUAVs != D3D11_KEEP_UNORDERED_ACCESS_VIEWS) {
|
||||
// UAVs are made available to all shader stages in
|
||||
// the graphics pipeline even though this code may
|
||||
// suggest that they are limited to the pixel shader.
|
||||
// This behaviour is only required for FL_11_1.
|
||||
BindUnorderedAccessViews(
|
||||
DxbcProgramType::PixelShader,
|
||||
m_state.ps.unorderedAccessViews,
|
||||
UAVStartSlot, NumUAVs,
|
||||
ppUnorderedAccessViews);
|
||||
|
||||
if (pUAVInitialCounts != nullptr) {
|
||||
InitUnorderedAccessViewCounters(NumUAVs,
|
||||
ppUnorderedAccessViews, pUAVInitialCounts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -65,6 +65,7 @@ namespace dxvk {
|
||||
D3D11ConstantBufferBindings constantBuffers;
|
||||
D3D11SamplerBindings samplers;
|
||||
D3D11ShaderResourceBindings shaderResources;
|
||||
D3D11UnorderedAccessBindings unorderedAccessViews;
|
||||
};
|
||||
|
||||
|
||||
|
@ -9,6 +9,14 @@
|
||||
#define D3D11_1_UAV_SLOT_COUNT 64
|
||||
#endif
|
||||
|
||||
#ifndef D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL
|
||||
#define D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL 0xFFFFFFFF
|
||||
#endif
|
||||
|
||||
#ifndef D3D11_KEEP_UNORDERED_ACCESS_VIEWS
|
||||
#define D3D11_KEEP_UNORDERED_ACCESS_VIEWS 0xFFFFFFFF
|
||||
#endif
|
||||
|
||||
// Most of these were copied from d3d11.h
|
||||
// For some strange reason, we cannot use the structures
|
||||
// directly, although others from the same header work.
|
||||
|
Loading…
x
Reference in New Issue
Block a user