mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-04-01 09:25:24 +02:00
[d3d9+dxso] Consider DMAP sampler in bit masks
This commit is contained in:
parent
bcaaac4ad7
commit
740ebec7ee
@ -13,14 +13,14 @@ namespace dxvk {
|
|||||||
enum D3D9SpecConstantId : uint32_t {
|
enum D3D9SpecConstantId : uint32_t {
|
||||||
SpecSamplerType, // 2 bits for 16 PS samplers | Bits: 32
|
SpecSamplerType, // 2 bits for 16 PS samplers | Bits: 32
|
||||||
|
|
||||||
SpecSamplerDepthMode, // 1 bit for 20 VS + PS samplers | Bits: 20
|
SpecSamplerDepthMode, // 1 bit for 21 VS + PS samplers | Bits: 21
|
||||||
SpecAlphaCompareOp, // Range: 0 -> 7 | Bits: 3
|
SpecAlphaCompareOp, // Range: 0 -> 7 | Bits: 3
|
||||||
SpecPointMode, // Range: 0 -> 3 | Bits: 2
|
SpecPointMode, // Range: 0 -> 3 | Bits: 2
|
||||||
SpecVertexFogMode, // Range: 0 -> 3 | Bits: 2
|
SpecVertexFogMode, // Range: 0 -> 3 | Bits: 2
|
||||||
SpecPixelFogMode, // Range: 0 -> 3 | Bits: 2
|
SpecPixelFogMode, // Range: 0 -> 3 | Bits: 2
|
||||||
SpecFogEnabled, // Range: 0 -> 1 | Bits: 1
|
SpecFogEnabled, // Range: 0 -> 1 | Bits: 1
|
||||||
|
|
||||||
SpecSamplerNull, // 1 bit for 20 samplers | Bits: 20
|
SpecSamplerNull, // 1 bit for 21 samplers | Bits: 21
|
||||||
SpecProjectionType, // 1 bit for 6 PS 1.x samplers | Bits: 6
|
SpecProjectionType, // 1 bit for 6 PS 1.x samplers | Bits: 6
|
||||||
SpecAlphaPrecisionBits, // Range: 0 -> 8 or 0xF | Bits: 4
|
SpecAlphaPrecisionBits, // Range: 0 -> 8 or 0xF | Bits: 4
|
||||||
|
|
||||||
@ -49,16 +49,16 @@ namespace dxvk {
|
|||||||
static constexpr std::array<BitfieldPosition, SpecConstantCount> Layout{{
|
static constexpr std::array<BitfieldPosition, SpecConstantCount> Layout{{
|
||||||
{ 0, 0, 32 }, // SamplerType
|
{ 0, 0, 32 }, // SamplerType
|
||||||
|
|
||||||
{ 1, 0, 20 }, // SamplerDepthMode
|
{ 1, 0, 21 }, // SamplerDepthMode
|
||||||
{ 1, 20, 3 }, // AlphaCompareOp
|
{ 1, 21, 3 }, // AlphaCompareOp
|
||||||
{ 1, 23, 2 }, // PointMode
|
{ 1, 24, 2 }, // PointMode
|
||||||
{ 1, 25, 2 }, // VertexFogMode
|
{ 1, 26, 2 }, // VertexFogMode
|
||||||
{ 1, 27, 2 }, // PixelFogMode
|
{ 1, 28, 2 }, // PixelFogMode
|
||||||
{ 1, 29, 1 }, // FogEnabled
|
{ 1, 30, 1 }, // FogEnabled
|
||||||
|
|
||||||
{ 2, 0, 20 }, // SamplerNull
|
{ 2, 0, 21 }, // SamplerNull
|
||||||
{ 2, 20, 6 }, // ProjectionType
|
{ 2, 21, 6 }, // ProjectionType
|
||||||
{ 2, 26, 4 }, // AlphaPrecisionBits
|
{ 2, 27, 4 }, // AlphaPrecisionBits
|
||||||
|
|
||||||
{ 3, 0, 16 }, // VertexShaderBools
|
{ 3, 0, 16 }, // VertexShaderBools
|
||||||
{ 3, 16, 16 }, // PixelShaderBools
|
{ 3, 16, 16 }, // PixelShaderBools
|
||||||
|
@ -2967,7 +2967,7 @@ void DxsoCompiler::emitControlFlowGenericLoop(
|
|||||||
|
|
||||||
auto SampleType = [&](DxsoSamplerType samplerType) {
|
auto SampleType = [&](DxsoSamplerType samplerType) {
|
||||||
uint32_t bitOffset = m_programInfo.type() == DxsoProgramTypes::VertexShader
|
uint32_t bitOffset = m_programInfo.type() == DxsoProgramTypes::VertexShader
|
||||||
? samplerIdx + caps::MaxTexturesPS
|
? samplerIdx + caps::MaxTexturesPS + 1
|
||||||
: samplerIdx;
|
: samplerIdx;
|
||||||
|
|
||||||
uint32_t isNull = m_spec.get(m_module, m_specUbo, SpecSamplerNull, bitOffset, 1);
|
uint32_t isNull = m_spec.get(m_module, m_specUbo, SpecSamplerNull, bitOffset, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user