mirror of https://github.com/AxioDL/metaforce.git
aurora: Windows compile & D3D12 fixes
This commit is contained in:
parent
ad90e4b511
commit
b9376280aa
|
@ -33,7 +33,9 @@ struct TevOp {
|
||||||
GX::TevScale scale = GX::TevScale::CS_SCALE_1;
|
GX::TevScale scale = GX::TevScale::CS_SCALE_1;
|
||||||
GX::TevRegID outReg = GX::TevRegID::TEVPREV;
|
GX::TevRegID outReg = GX::TevRegID::TEVPREV;
|
||||||
bool clamp = true;
|
bool clamp = true;
|
||||||
u32 _pad : 24 = 0;
|
u8 _p1 = 0;
|
||||||
|
u8 _p2 = 0;
|
||||||
|
u8 _p3 = 0;
|
||||||
bool operator==(const TevOp&) const = default;
|
bool operator==(const TevOp&) const = default;
|
||||||
};
|
};
|
||||||
static_assert(std::has_unique_object_representations_v<TevOp>);
|
static_assert(std::has_unique_object_representations_v<TevOp>);
|
||||||
|
@ -69,7 +71,9 @@ struct ColorChannelConfig {
|
||||||
GX::ColorSrc matSrc = GX::SRC_REG;
|
GX::ColorSrc matSrc = GX::SRC_REG;
|
||||||
GX::ColorSrc ambSrc = GX::SRC_REG;
|
GX::ColorSrc ambSrc = GX::SRC_REG;
|
||||||
bool lightingEnabled = false;
|
bool lightingEnabled = false;
|
||||||
u32 _pad : 24 = 0;
|
u8 _p1 = 0;
|
||||||
|
u8 _p2 = 0;
|
||||||
|
u8 _p3 = 0;
|
||||||
bool operator==(const ColorChannelConfig&) const = default;
|
bool operator==(const ColorChannelConfig&) const = default;
|
||||||
};
|
};
|
||||||
static_assert(std::has_unique_object_representations_v<ColorChannelConfig>);
|
static_assert(std::has_unique_object_representations_v<ColorChannelConfig>);
|
||||||
|
@ -88,7 +92,9 @@ struct TcgConfig {
|
||||||
GX::TexMtx mtx = GX::IDENTITY;
|
GX::TexMtx mtx = GX::IDENTITY;
|
||||||
GX::PTTexMtx postMtx = GX::PTIDENTITY;
|
GX::PTTexMtx postMtx = GX::PTIDENTITY;
|
||||||
bool normalize = false;
|
bool normalize = false;
|
||||||
u32 _pad : 24 = 0;
|
u8 _p1 = 0;
|
||||||
|
u8 _p2 = 0;
|
||||||
|
u8 _p3 = 0;
|
||||||
bool operator==(const TcgConfig&) const = default;
|
bool operator==(const TcgConfig&) const = default;
|
||||||
};
|
};
|
||||||
static_assert(std::has_unique_object_representations_v<TcgConfig>);
|
static_assert(std::has_unique_object_representations_v<TcgConfig>);
|
||||||
|
|
|
@ -688,9 +688,8 @@ wgpu::ShaderModule build_shader(const ShaderConfig& config, const ShaderInfo& in
|
||||||
} else if (attr >= GX::VA_TEX0 && attr <= GX::VA_TEX7) {
|
} else if (attr >= GX::VA_TEX0 && attr <= GX::VA_TEX7) {
|
||||||
arrType = "vec2<f32>";
|
arrType = "vec2<f32>";
|
||||||
}
|
}
|
||||||
uniformBindings += fmt::format(
|
uniformBindings += fmt::format(FMT_STRING("\n@group(0) @binding({})"
|
||||||
"\n@group(0) @binding({})"
|
"\nvar<storage, read> v_arr_{}: array<{}>;"),
|
||||||
"\nvar<storage, read> v_arr_{}: array<{}>;",
|
|
||||||
uniBindingIdx++, attrName, arrType);
|
uniBindingIdx++, attrName, arrType);
|
||||||
}
|
}
|
||||||
++currAttrIdx;
|
++currAttrIdx;
|
||||||
|
|
|
@ -150,8 +150,12 @@ void initialize(SDL_Window* window) {
|
||||||
.limits =
|
.limits =
|
||||||
{
|
{
|
||||||
// Use "best" supported alignments
|
// Use "best" supported alignments
|
||||||
.minUniformBufferOffsetAlignment = supportedLimits.limits.minUniformBufferOffsetAlignment,
|
.minUniformBufferOffsetAlignment = supportedLimits.limits.minUniformBufferOffsetAlignment == 0
|
||||||
.minStorageBufferOffsetAlignment = supportedLimits.limits.minStorageBufferOffsetAlignment,
|
? WGPU_LIMIT_U32_UNDEFINED
|
||||||
|
: supportedLimits.limits.minUniformBufferOffsetAlignment,
|
||||||
|
.minStorageBufferOffsetAlignment = supportedLimits.limits.minStorageBufferOffsetAlignment == 0
|
||||||
|
? WGPU_LIMIT_U32_UNDEFINED
|
||||||
|
: supportedLimits.limits.minStorageBufferOffsetAlignment,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const std::array<wgpu::FeatureName, 1> requiredFeatures{
|
const std::array<wgpu::FeatureName, 1> requiredFeatures{
|
||||||
|
|
Loading…
Reference in New Issue