mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 01:24:11 +01:00
[d3d11] Implemented ClearUnorderedAccessViewUint for images
This commit is contained in:
parent
fc947f5985
commit
e25f4b2299
@ -85,8 +85,6 @@ namespace dxvk {
|
||||
mode.alphaSrcFactor = DecodeBlendFactor(BlendDesc.SrcBlendAlpha, true);
|
||||
mode.alphaDstFactor = DecodeBlendFactor(BlendDesc.DestBlendAlpha, true);
|
||||
mode.alphaBlendOp = DecodeBlendOp(BlendDesc.BlendOpAlpha);
|
||||
// TODO find out if D3D11 wants us to apply the write mask if blending
|
||||
// is disabled as well. This is standard behaviour in Vulkan.
|
||||
mode.writeMask = BlendDesc.RenderTargetWriteMask;
|
||||
return mode;
|
||||
}
|
||||
|
@ -466,7 +466,24 @@ namespace dxvk {
|
||||
void STDMETHODCALLTYPE D3D11DeviceContext::ClearUnorderedAccessViewUint(
|
||||
ID3D11UnorderedAccessView* pUnorderedAccessView,
|
||||
const UINT Values[4]) {
|
||||
Logger::err("D3D11DeviceContext::ClearUnorderedAccessViewUint: Not implemented");
|
||||
auto uav = static_cast<D3D11UnorderedAccessView*>(pUnorderedAccessView);
|
||||
|
||||
if (uav->GetResourceType() == D3D11_RESOURCE_DIMENSION_BUFFER) {
|
||||
Logger::err("D3D11: ClearUnorderedAccessViewUint: Not supported for buffers");
|
||||
} else {
|
||||
VkClearColorValue clearValue;
|
||||
|
||||
for (uint32_t i = 0; i < 4; i++)
|
||||
clearValue.uint32[i] = Values[i];
|
||||
|
||||
EmitCs([
|
||||
cClearValue = clearValue,
|
||||
cDstView = uav->GetImageView()
|
||||
] (DxvkContext* ctx) {
|
||||
ctx->clearColorImage(cDstView->image(),
|
||||
cClearValue, cDstView->subresources());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user