include: Add texture filtering macros.

This commit is contained in:
Józef Kucia 2017-07-12 13:10:44 +02:00
parent 85b7dd6d73
commit 8a455b6043

View File

@ -691,6 +691,52 @@ typedef enum D3D12_FILTER
D3D12_FILTER_MAXIMUM_ANISOTROPIC = 0x1d5,
} D3D12_FILTER;
typedef enum D3D12_FILTER_TYPE
{
D3D12_FILTER_TYPE_POINT = 0,
D3D12_FILTER_TYPE_LINEAR = 1,
} D3D12_FILTER_TYPE;
const UINT D3D12_MIP_FILTER_SHIFT = 0;
const UINT D3D12_MAG_FILTER_SHIFT = 2;
const UINT D3D12_MIN_FILTER_SHIFT = 4;
const UINT D3D12_FILTER_TYPE_MASK = 0x3;
const UINT D3D12_ANISOTROPIC_FILTERING_BIT = 0x40;
typedef enum D3D12_FILTER_REDUCTION_TYPE
{
D3D12_FILTER_REDUCTION_TYPE_STANDARD = 0,
D3D12_FILTER_REDUCTION_TYPE_COMPARISON = 1,
D3D12_FILTER_REDUCTION_TYPE_MINIMUM = 2,
D3D12_FILTER_REDUCTION_TYPE_MAXIMUM = 3,
} D3D12_FILTER_REDUCTION_TYPE;
const UINT D3D12_FILTER_REDUCTION_TYPE_MASK = 0x3;
const UINT D3D12_FILTER_REDUCTION_TYPE_SHIFT = 7;
cpp_quote("#define D3D12_DECODE_MAG_FILTER(filter) \\")
cpp_quote(" ((D3D12_FILTER_TYPE)(((filter) >> D3D12_MAG_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK))")
cpp_quote("#define D3D12_DECODE_MIN_FILTER(filter) \\")
cpp_quote(" ((D3D12_FILTER_TYPE)(((filter) >> D3D12_MIN_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK))")
cpp_quote("#define D3D12_DECODE_MIP_FILTER(filter) \\")
cpp_quote(" ((D3D12_FILTER_TYPE)(((filter) >> D3D12_MIP_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK))")
cpp_quote("#define D3D12_DECODE_IS_ANISOTROPIC_FILTER(filter) \\")
cpp_quote(" (((filter) & D3D12_ANISOTROPIC_FILTERING_BIT) \\")
cpp_quote(" && (D3D12_DECODE_MIN_FILTER(filter) == D3D12_FILTER_TYPE_LINEAR) \\")
cpp_quote(" && (D3D12_DECODE_MAG_FILTER(filter) == D3D12_FILTER_TYPE_LINEAR) \\")
cpp_quote(" && (D3D12_DECODE_MIP_FILTER(filter) == D3D12_FILTER_TYPE_LINEAR))")
cpp_quote("#define D3D12_DECODE_FILTER_REDUCTION(filter) \\")
cpp_quote(" ((D3D12_FILTER_REDUCTION_TYPE)(((filter) >> D3D12_FILTER_REDUCTION_TYPE_SHIFT) \\")
cpp_quote(" & D3D12_FILTER_REDUCTION_TYPE_MASK))")
cpp_quote("#define D3D12_DECODE_IS_COMPARISON_FILTER(filter) \\")
cpp_quote(" (D3D12_DECODE_FILTER_REDUCTION(filter) == D3D12_FILTER_REDUCTION_TYPE_COMPARISON)")
typedef enum D3D12_TEXTURE_ADDRESS_MODE
{
D3D12_TEXTURE_ADDRESS_MODE_WRAP = 1,