mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-13 16:08:50 +01:00
81a5e2fa0c
This is necessary in situations when we need to get the Vulkan format that corresponds to the DXGI format rather than the remapped one.
55 lines
1.3 KiB
C++
55 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "../dxvk/dxvk_device.h"
|
|
|
|
#include "../dxbc/dxbc_util.h"
|
|
|
|
#include "d3d11_include.h"
|
|
|
|
namespace dxvk {
|
|
|
|
template<typename T>
|
|
UINT CompactSparseList(T* pData, UINT Mask) {
|
|
uint32_t count = 0;
|
|
|
|
while (Mask != 0) {
|
|
uint32_t id = bit::tzcnt(Mask);
|
|
pData[count++] = pData[id];
|
|
Mask &= Mask - 1;
|
|
}
|
|
|
|
return count;
|
|
}
|
|
|
|
HRESULT DecodeSampleCount(
|
|
UINT Count,
|
|
VkSampleCountFlagBits* pCount);
|
|
|
|
VkSamplerAddressMode DecodeAddressMode(
|
|
D3D11_TEXTURE_ADDRESS_MODE mode);
|
|
|
|
VkCompareOp DecodeCompareOp(
|
|
D3D11_COMPARISON_FUNC Mode);
|
|
|
|
VkMemoryPropertyFlags GetMemoryFlagsForUsage(
|
|
D3D11_USAGE Usage);
|
|
|
|
VkShaderStageFlagBits GetShaderStage(
|
|
DxbcProgramType ProgramType);
|
|
|
|
VkBufferUsageFlags GetBufferUsageFlags(
|
|
UINT BindFlags);
|
|
|
|
VkImageUsageFlags GetImageUsageFlags(
|
|
UINT BindFlags);
|
|
|
|
VkFormatFeatureFlags GetBufferFormatFeatures(
|
|
UINT BindFlags);
|
|
|
|
VkFormatFeatureFlags GetImageFormatFeatures(
|
|
UINT BindFlags);
|
|
|
|
VkFormat GetPackedDepthStencilFormat(
|
|
DXGI_FORMAT Format);
|
|
|
|
} |