1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-14 00:48:44 +01:00
dxvk/src/d3d11/d3d11_util.h

43 lines
947 B
C
Raw Normal View History

#pragma once
2017-12-15 19:11:10 +01:00
#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(
2017-12-19 16:01:50 +01:00
UINT Count,
VkSampleCountFlagBits* pCount);
VkSamplerAddressMode DecodeAddressMode(
D3D11_TEXTURE_ADDRESS_MODE mode);
2017-12-19 16:01:50 +01:00
VkBorderColor DecodeBorderColor(
const FLOAT BorderColor[4]);
VkCompareOp DecodeCompareOp(
D3D11_COMPARISON_FUNC Mode);
VkMemoryPropertyFlags GetMemoryFlagsForUsage(
D3D11_USAGE Usage);
VkShaderStageFlagBits GetShaderStage(
DxbcProgramType ProgramType);
}