mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 01:24:11 +01:00
[d3d11] Store map mode as raw integer
Fixes some annoying error with clang, hopefully.
This commit is contained in:
parent
12c2b2f81b
commit
4fb6403b8f
@ -625,7 +625,7 @@ namespace dxvk {
|
||||
|
||||
// If the texture has an image as well as a staging buffer,
|
||||
// upload the written buffer data to the image
|
||||
bool needsUpload = mapType != D3D11_MAP_READ
|
||||
bool needsUpload = mapType != uint32_t(D3D11_MAP_READ)
|
||||
&& (mapMode == D3D11_COMMON_TEXTURE_MAP_MODE_BUFFER || mapMode == D3D11_COMMON_TEXTURE_MAP_MODE_DYNAMIC);
|
||||
|
||||
if (needsUpload) {
|
||||
|
@ -1452,10 +1452,10 @@ namespace dxvk {
|
||||
|| texture->CountSubresources() <= SrcSubresource)
|
||||
return;
|
||||
|
||||
D3D11_MAP map = texture->GetMapType(SrcSubresource);
|
||||
uint32_t map = texture->GetMapType(SrcSubresource);
|
||||
|
||||
if (map != D3D11_MAP_READ
|
||||
&& map != D3D11_MAP_READ_WRITE)
|
||||
if (map != uint32_t(D3D11_MAP_READ)
|
||||
&& map != uint32_t(D3D11_MAP_READ_WRITE))
|
||||
return;
|
||||
|
||||
CopySubresourceData(
|
||||
@ -1481,11 +1481,11 @@ namespace dxvk {
|
||||
|| texture->CountSubresources() <= DstSubresource)
|
||||
return;
|
||||
|
||||
D3D11_MAP map = texture->GetMapType(DstSubresource);
|
||||
uint32_t map = texture->GetMapType(DstSubresource);
|
||||
|
||||
if (map != D3D11_MAP_WRITE
|
||||
&& map != D3D11_MAP_WRITE_NO_OVERWRITE
|
||||
&& map != D3D11_MAP_READ_WRITE)
|
||||
if (map != uint32_t(D3D11_MAP_WRITE)
|
||||
&& map != uint32_t(D3D11_MAP_WRITE_NO_OVERWRITE)
|
||||
&& map != uint32_t(D3D11_MAP_READ_WRITE))
|
||||
return;
|
||||
|
||||
CopySubresourceData(
|
||||
|
@ -85,7 +85,7 @@ namespace dxvk {
|
||||
|
||||
public:
|
||||
|
||||
static constexpr D3D11_MAP UnmappedSubresource = D3D11_MAP(-1u);
|
||||
static constexpr uint32_t UnmappedSubresource = ~0u;
|
||||
|
||||
D3D11CommonTexture(
|
||||
ID3D11Resource* pInterface,
|
||||
@ -200,10 +200,10 @@ namespace dxvk {
|
||||
* \param [in] Subresource Subresource index
|
||||
* \returns Current map mode of that subresource
|
||||
*/
|
||||
D3D11_MAP GetMapType(UINT Subresource) const {
|
||||
uint32_t GetMapType(UINT Subresource) const {
|
||||
return Subresource < m_mapInfo.size()
|
||||
? D3D11_MAP(m_mapInfo[Subresource].mapType)
|
||||
: D3D11_MAP(~0u);
|
||||
? m_mapInfo[Subresource].mapType
|
||||
: UnmappedSubresource;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -216,7 +216,7 @@ namespace dxvk {
|
||||
*/
|
||||
void NotifyMap(UINT Subresource, D3D11_MAP MapType) {
|
||||
if (likely(Subresource < m_mapInfo.size())) {
|
||||
m_mapInfo[Subresource].mapType = MapType;
|
||||
m_mapInfo[Subresource].mapType = uint32_t(MapType);
|
||||
|
||||
if (m_mapMode == D3D11_COMMON_TEXTURE_MAP_MODE_DYNAMIC)
|
||||
CreateMappedBuffer(Subresource);
|
||||
@ -561,7 +561,7 @@ namespace dxvk {
|
||||
|
||||
struct MappedInfo {
|
||||
D3D11_COMMON_TEXTURE_SUBRESOURCE_LAYOUT layout = { };
|
||||
D3D11_MAP mapType = UnmappedSubresource;
|
||||
uint32_t mapType = UnmappedSubresource;
|
||||
uint64_t seq = 0u;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user