1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-03 22:24:13 +01:00

Merge remote-tracking branch 'libcg/stadium2'

This commit is contained in:
Philip Rebohle 2018-01-16 19:27:23 +01:00
commit 052f231295
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 35 additions and 13 deletions

View File

@ -488,18 +488,39 @@ namespace dxvk {
srcBuffer.offset(), srcBuffer.offset(),
srcBuffer.length()); srcBuffer.length());
} else { } else {
Logger::err("D3D11DeviceContext::CopyResource: Images not supported"); const D3D11TextureInfo* dstTextureInfo = GetCommonTextureInfo(pDstResource);
const D3D11TextureInfo* srcTextureInfo = GetCommonTextureInfo(pSrcResource);
const DxvkFormatInfo* dstFormatInfo = imageFormatInfo(dstTextureInfo->image->info().format);
const DxvkFormatInfo* srcFormatInfo = imageFormatInfo(srcTextureInfo->image->info().format);
for (uint32_t i = 0; i < srcTextureInfo->image->info().mipLevels; i++) {
VkExtent3D extent = srcTextureInfo->image->mipLevelExtent(i);
const VkImageSubresourceLayers dstLayers = {
dstFormatInfo->aspectMask & srcFormatInfo->aspectMask,
i, 0, dstTextureInfo->image->info().numLayers };
const VkImageSubresourceLayers srcLayers = {
dstFormatInfo->aspectMask & srcFormatInfo->aspectMask,
i, 0, srcTextureInfo->image->info().numLayers };
m_context->copyImage(
dstTextureInfo->image, dstLayers, VkOffset3D { 0, 0, 0 },
srcTextureInfo->image, srcLayers, VkOffset3D { 0, 0, 0 },
extent);
}
} }
} }
void STDMETHODCALLTYPE D3D11DeviceContext::CopyStructureCount( void STDMETHODCALLTYPE D3D11DeviceContext::CopyStructureCount(
ID3D11Buffer* pDstBuffer, ID3D11Buffer* pDstBuffer,
UINT DstAlignedByteOffset, UINT DstAlignedByteOffset,
ID3D11UnorderedAccessView* pSrcView) { ID3D11UnorderedAccessView* pSrcView) {
auto buf = static_cast<D3D11Buffer*>(pDstBuffer); auto buf = static_cast<D3D11Buffer*>(pDstBuffer);
auto uav = static_cast<D3D11UnorderedAccessView*>(pSrcView); auto uav = static_cast<D3D11UnorderedAccessView*>(pSrcView);
const DxvkBufferSlice dstSlice = buf->GetBufferSlice(DstAlignedByteOffset); const DxvkBufferSlice dstSlice = buf->GetBufferSlice(DstAlignedByteOffset);
const DxvkBufferSlice srcSlice = uav->GetCounterSlice(); const DxvkBufferSlice srcSlice = uav->GetCounterSlice();

View File

@ -1063,16 +1063,9 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE D3D11Device::CreateQuery( HRESULT STDMETHODCALLTYPE D3D11Device::CreateQuery(
const D3D11_QUERY_DESC* pQueryDesc, const D3D11_QUERY_DESC* pQueryDesc,
ID3D11Query** ppQuery) { ID3D11Query** ppQuery) {
// Other query types are currently unsupported
if (pQueryDesc->Query != D3D11_QUERY_OCCLUSION
&& pQueryDesc->Query != D3D11_QUERY_OCCLUSION_PREDICATE) {
Logger::err(str::format("D3D11Device: Unsupported query type: ", pQueryDesc->Query));
return E_INVALIDARG;
}
if (ppQuery == nullptr) if (ppQuery == nullptr)
return S_FALSE; return S_FALSE;
try { try {
*ppQuery = ref(new D3D11Query(this, *pQueryDesc)); *ppQuery = ref(new D3D11Query(this, *pQueryDesc));
return S_OK; return S_OK;

View File

@ -7,7 +7,15 @@ namespace dxvk {
D3D11Device* device, D3D11Device* device,
const D3D11_QUERY_DESC& desc) const D3D11_QUERY_DESC& desc)
: m_device(device), m_desc(desc) { : m_device(device), m_desc(desc) {
Logger::warn("D3D11Query: Stub"); switch (desc.Query) {
// Other query types are currently unsupported
case D3D11_QUERY_OCCLUSION:
case D3D11_QUERY_OCCLUSION_PREDICATE:
break;
default:
Logger::warn(str::format("D3D11Query: Unsupported query type ", desc.Query));
}
} }