[d3d9] Fix ColorFill using sampler views for partial extents

Closes #1434
This commit is contained in:
Joshua Ashton 2020-02-13 23:31:48 +00:00 committed by Philip Rebohle
parent 02c79d892c
commit 2096a95262
1 changed files with 7 additions and 5 deletions

View File

@ -1058,17 +1058,16 @@ namespace dxvk {
&& extent == mipExtent;
}
Rc<DxvkImageView> imageView = dst->GetImageView(false);
Rc<DxvkImageView> renderTargetView = dst->GetRenderTargetView(false);
Rc<DxvkImageView> rtView = dst->GetRenderTargetView(false);
VkClearValue clearValue;
DecodeD3DCOLOR(Color, clearValue.color.float32);
// Fast path for games that may use this as an
// alternative to Clear on render targets.
if (isFullExtent && renderTargetView != nullptr) {
if (isFullExtent && rtView != nullptr) {
EmitCs([
cImageView = renderTargetView,
cImageView = rtView,
cClearValue = clearValue
] (DxvkContext* ctx) {
ctx->clearRenderTarget(
@ -1077,8 +1076,11 @@ namespace dxvk {
cClearValue);
});
} else {
if (unlikely(rtView == nullptr))
Logger::err(str::format("D3D9DeviceEx::ColorFill: Unsupported format ", dstTextureInfo->Desc()->Format));
EmitCs([
cImageView = imageView,
cImageView = rtView,
cOffset = offset,
cExtent = extent,
cClearValue = clearValue