1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-13 16:08:50 +01:00

[d3d11] Remove unused parameters from deferred context Map functions

This commit is contained in:
Philip Rebohle 2022-02-06 18:17:52 +01:00
parent b5d7b42e65
commit e4dbd1e337
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 2 additions and 15 deletions

View File

@ -197,8 +197,8 @@ namespace dxvk {
D3D11DeferredContextMapEntry entry; D3D11DeferredContextMapEntry entry;
HRESULT status = resourceDim == D3D11_RESOURCE_DIMENSION_BUFFER HRESULT status = resourceDim == D3D11_RESOURCE_DIMENSION_BUFFER
? MapBuffer(pResource, MapType, MapFlags, &entry) ? MapBuffer(pResource, &entry)
: MapImage (pResource, Subresource, MapType, MapFlags, &entry); : MapImage (pResource, Subresource, &entry);
if (unlikely(FAILED(status))) { if (unlikely(FAILED(status))) {
*pMappedResource = D3D11_MAPPED_SUBRESOURCE(); *pMappedResource = D3D11_MAPPED_SUBRESOURCE();
@ -226,8 +226,6 @@ namespace dxvk {
} }
// Return same memory region as earlier // Return same memory region as earlier
entry->MapType = D3D11_MAP_WRITE_NO_OVERWRITE;
pMappedResource->pData = entry->MapPointer; pMappedResource->pData = entry->MapPointer;
pMappedResource->RowPitch = entry->RowPitch; pMappedResource->RowPitch = entry->RowPitch;
pMappedResource->DepthPitch = entry->DepthPitch; pMappedResource->DepthPitch = entry->DepthPitch;
@ -259,8 +257,6 @@ namespace dxvk {
HRESULT D3D11DeferredContext::MapBuffer( HRESULT D3D11DeferredContext::MapBuffer(
ID3D11Resource* pResource, ID3D11Resource* pResource,
D3D11_MAP MapType,
UINT MapFlags,
D3D11DeferredContextMapEntry* pMapEntry) { D3D11DeferredContextMapEntry* pMapEntry) {
D3D11Buffer* pBuffer = static_cast<D3D11Buffer*>(pResource); D3D11Buffer* pBuffer = static_cast<D3D11Buffer*>(pResource);
@ -271,7 +267,6 @@ namespace dxvk {
pMapEntry->pResource = pResource; pMapEntry->pResource = pResource;
pMapEntry->Subresource = 0; pMapEntry->Subresource = 0;
pMapEntry->MapType = D3D11_MAP_WRITE_DISCARD;
pMapEntry->RowPitch = pBuffer->Desc()->ByteWidth; pMapEntry->RowPitch = pBuffer->Desc()->ByteWidth;
pMapEntry->DepthPitch = pBuffer->Desc()->ByteWidth; pMapEntry->DepthPitch = pBuffer->Desc()->ByteWidth;
@ -311,8 +306,6 @@ namespace dxvk {
HRESULT D3D11DeferredContext::MapImage( HRESULT D3D11DeferredContext::MapImage(
ID3D11Resource* pResource, ID3D11Resource* pResource,
UINT Subresource, UINT Subresource,
D3D11_MAP MapType,
UINT MapFlags,
D3D11DeferredContextMapEntry* pMapEntry) { D3D11DeferredContextMapEntry* pMapEntry) {
D3D11CommonTexture* pTexture = GetCommonTexture(pResource); D3D11CommonTexture* pTexture = GetCommonTexture(pResource);
@ -337,7 +330,6 @@ namespace dxvk {
pMapEntry->pResource = pResource; pMapEntry->pResource = pResource;
pMapEntry->Subresource = Subresource; pMapEntry->Subresource = Subresource;
pMapEntry->MapType = D3D11_MAP_WRITE_DISCARD;
pMapEntry->RowPitch = layout.RowPitch; pMapEntry->RowPitch = layout.RowPitch;
pMapEntry->DepthPitch = layout.DepthPitch; pMapEntry->DepthPitch = layout.DepthPitch;
pMapEntry->MapPointer = dataSlice.mapPtr(0); pMapEntry->MapPointer = dataSlice.mapPtr(0);

View File

@ -13,7 +13,6 @@ namespace dxvk {
struct D3D11DeferredContextMapEntry { struct D3D11DeferredContextMapEntry {
Com<ID3D11Resource> pResource; Com<ID3D11Resource> pResource;
UINT Subresource; UINT Subresource;
D3D11_MAP MapType;
UINT RowPitch; UINT RowPitch;
UINT DepthPitch; UINT DepthPitch;
void* MapPointer; void* MapPointer;
@ -98,15 +97,11 @@ namespace dxvk {
HRESULT MapBuffer( HRESULT MapBuffer(
ID3D11Resource* pResource, ID3D11Resource* pResource,
D3D11_MAP MapType,
UINT MapFlags,
D3D11DeferredContextMapEntry* pMapEntry); D3D11DeferredContextMapEntry* pMapEntry);
HRESULT MapImage( HRESULT MapImage(
ID3D11Resource* pResource, ID3D11Resource* pResource,
UINT Subresource, UINT Subresource,
D3D11_MAP MapType,
UINT MapFlags,
D3D11DeferredContextMapEntry* pMapEntry); D3D11DeferredContextMapEntry* pMapEntry);
void FinalizeQueries(); void FinalizeQueries();