mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 19:50:13 +02:00
Fix build issue with updated D3DX12
This commit is contained in:
parent
79e898607d
commit
5837e1b482
@ -1426,120 +1426,6 @@ struct CD3DX12_STATIC_SAMPLER_DESC : public D3D12_STATIC_SAMPLER_DESC
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------------
|
|
||||||
#if defined(NTDDI_WIN10_CU) || defined(USING_D3D12_AGILITY_SDK)
|
|
||||||
struct CD3DX12_STATIC_SAMPLER_DESC1 : public D3D12_STATIC_SAMPLER_DESC1
|
|
||||||
{
|
|
||||||
CD3DX12_STATIC_SAMPLER_DESC1() = default;
|
|
||||||
explicit CD3DX12_STATIC_SAMPLER_DESC1(const D3D12_STATIC_SAMPLER_DESC &o) noexcept
|
|
||||||
{
|
|
||||||
memcpy(this, &o, sizeof(D3D12_STATIC_SAMPLER_DESC));
|
|
||||||
Flags = D3D12_SAMPLER_FLAGS::D3D12_SAMPLER_FLAG_NONE;
|
|
||||||
}
|
|
||||||
explicit CD3DX12_STATIC_SAMPLER_DESC1(const D3D12_STATIC_SAMPLER_DESC1 & o) noexcept :
|
|
||||||
D3D12_STATIC_SAMPLER_DESC1(o)
|
|
||||||
{}
|
|
||||||
CD3DX12_STATIC_SAMPLER_DESC1(
|
|
||||||
UINT shaderRegister,
|
|
||||||
D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC,
|
|
||||||
D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
|
|
||||||
D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
|
|
||||||
D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
|
|
||||||
FLOAT mipLODBias = 0,
|
|
||||||
UINT maxAnisotropy = 16,
|
|
||||||
D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL,
|
|
||||||
D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE,
|
|
||||||
FLOAT minLOD = 0.f,
|
|
||||||
FLOAT maxLOD = D3D12_FLOAT32_MAX,
|
|
||||||
D3D12_SHADER_VISIBILITY shaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
|
|
||||||
UINT registerSpace = 0,
|
|
||||||
D3D12_SAMPLER_FLAGS flags = D3D12_SAMPLER_FLAGS::D3D12_SAMPLER_FLAG_NONE) noexcept
|
|
||||||
{
|
|
||||||
Init(
|
|
||||||
shaderRegister,
|
|
||||||
filter,
|
|
||||||
addressU,
|
|
||||||
addressV,
|
|
||||||
addressW,
|
|
||||||
mipLODBias,
|
|
||||||
maxAnisotropy,
|
|
||||||
comparisonFunc,
|
|
||||||
borderColor,
|
|
||||||
minLOD,
|
|
||||||
maxLOD,
|
|
||||||
shaderVisibility,
|
|
||||||
registerSpace,
|
|
||||||
flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void Init(
|
|
||||||
_Out_ D3D12_STATIC_SAMPLER_DESC1 &samplerDesc,
|
|
||||||
UINT shaderRegister,
|
|
||||||
D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC,
|
|
||||||
D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
|
|
||||||
D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
|
|
||||||
D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
|
|
||||||
FLOAT mipLODBias = 0,
|
|
||||||
UINT maxAnisotropy = 16,
|
|
||||||
D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL,
|
|
||||||
D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE,
|
|
||||||
FLOAT minLOD = 0.f,
|
|
||||||
FLOAT maxLOD = D3D12_FLOAT32_MAX,
|
|
||||||
D3D12_SHADER_VISIBILITY shaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
|
|
||||||
UINT registerSpace = 0,
|
|
||||||
D3D12_SAMPLER_FLAGS flags = D3D12_SAMPLER_FLAGS::D3D12_SAMPLER_FLAG_NONE) noexcept
|
|
||||||
{
|
|
||||||
samplerDesc.ShaderRegister = shaderRegister;
|
|
||||||
samplerDesc.Filter = filter;
|
|
||||||
samplerDesc.AddressU = addressU;
|
|
||||||
samplerDesc.AddressV = addressV;
|
|
||||||
samplerDesc.AddressW = addressW;
|
|
||||||
samplerDesc.MipLODBias = mipLODBias;
|
|
||||||
samplerDesc.MaxAnisotropy = maxAnisotropy;
|
|
||||||
samplerDesc.ComparisonFunc = comparisonFunc;
|
|
||||||
samplerDesc.BorderColor = borderColor;
|
|
||||||
samplerDesc.MinLOD = minLOD;
|
|
||||||
samplerDesc.MaxLOD = maxLOD;
|
|
||||||
samplerDesc.ShaderVisibility = shaderVisibility;
|
|
||||||
samplerDesc.RegisterSpace = registerSpace;
|
|
||||||
samplerDesc.Flags = flags;
|
|
||||||
}
|
|
||||||
inline void Init(
|
|
||||||
UINT shaderRegister,
|
|
||||||
D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC,
|
|
||||||
D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
|
|
||||||
D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
|
|
||||||
D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
|
|
||||||
FLOAT mipLODBias = 0,
|
|
||||||
UINT maxAnisotropy = 16,
|
|
||||||
D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL,
|
|
||||||
D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE,
|
|
||||||
FLOAT minLOD = 0.f,
|
|
||||||
FLOAT maxLOD = D3D12_FLOAT32_MAX,
|
|
||||||
D3D12_SHADER_VISIBILITY shaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
|
|
||||||
UINT registerSpace = 0,
|
|
||||||
D3D12_SAMPLER_FLAGS flags = D3D12_SAMPLER_FLAGS::D3D12_SAMPLER_FLAG_NONE) noexcept
|
|
||||||
{
|
|
||||||
Init(
|
|
||||||
*this,
|
|
||||||
shaderRegister,
|
|
||||||
filter,
|
|
||||||
addressU,
|
|
||||||
addressV,
|
|
||||||
addressW,
|
|
||||||
mipLODBias,
|
|
||||||
maxAnisotropy,
|
|
||||||
comparisonFunc,
|
|
||||||
borderColor,
|
|
||||||
minLOD,
|
|
||||||
maxLOD,
|
|
||||||
shaderVisibility,
|
|
||||||
registerSpace,
|
|
||||||
flags);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
#endif // NTDDI_WIN10_CU || USING_D3D12_AGILITY_SDK
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------
|
||||||
struct CD3DX12_ROOT_SIGNATURE_DESC : public D3D12_ROOT_SIGNATURE_DESC
|
struct CD3DX12_ROOT_SIGNATURE_DESC : public D3D12_ROOT_SIGNATURE_DESC
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user