mirror of https://github.com/AxioDL/metaforce.git
Final(?) GCC 9 fixes
This commit is contained in:
parent
f0936a7fb0
commit
25a0fe4a73
|
@ -60,7 +60,6 @@ class CCameraShakeData {
|
||||||
public:
|
public:
|
||||||
static const CCameraShakeData skChargedShotCameraShakeData;
|
static const CCameraShakeData skChargedShotCameraShakeData;
|
||||||
|
|
||||||
constexpr CCameraShakeData() = default;
|
|
||||||
constexpr CCameraShakeData(float duration, float sfxDist, u32 flags, const zeus::CVector3f& sfxPos,
|
constexpr CCameraShakeData(float duration, float sfxDist, u32 flags, const zeus::CVector3f& sfxPos,
|
||||||
const CCameraShakerComponent& shaker1, const CCameraShakerComponent& shaker2,
|
const CCameraShakerComponent& shaker1, const CCameraShakerComponent& shaker2,
|
||||||
const CCameraShakerComponent& shaker3) noexcept
|
const CCameraShakerComponent& shaker3) noexcept
|
||||||
|
|
|
@ -71,6 +71,7 @@ struct Command {
|
||||||
return left == rhs.left && top == rhs.top && width == rhs.width && height == rhs.height && znear == rhs.znear &&
|
return left == rhs.left && top == rhs.top && width == rhs.width && height == rhs.height && znear == rhs.znear &&
|
||||||
zfar == rhs.zfar;
|
zfar == rhs.zfar;
|
||||||
}
|
}
|
||||||
|
bool operator!=(const SetViewportCommand& rhs) const { return !(*this == rhs); }
|
||||||
} setViewport;
|
} setViewport;
|
||||||
struct SetScissorCommand {
|
struct SetScissorCommand {
|
||||||
uint32_t x;
|
uint32_t x;
|
||||||
|
@ -81,6 +82,7 @@ struct Command {
|
||||||
bool operator==(const SetScissorCommand& rhs) const {
|
bool operator==(const SetScissorCommand& rhs) const {
|
||||||
return x == rhs.x && y == rhs.y && w == rhs.w && h == rhs.h;
|
return x == rhs.x && y == rhs.y && w == rhs.w && h == rhs.h;
|
||||||
}
|
}
|
||||||
|
bool operator!=(const SetScissorCommand& rhs) const { return !(*this == rhs); }
|
||||||
} setScissor;
|
} setScissor;
|
||||||
ShaderDrawCommand draw;
|
ShaderDrawCommand draw;
|
||||||
} data;
|
} data;
|
||||||
|
@ -229,9 +231,12 @@ void set_scissor(uint32_t x, uint32_t y, uint32_t w, uint32_t h) noexcept {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(const wgpu::Extent3D& lhs, const wgpu::Extent3D& rhs) {
|
static inline bool operator==(const wgpu::Extent3D& lhs, const wgpu::Extent3D& rhs) {
|
||||||
return lhs.width == rhs.width && lhs.height == rhs.height && lhs.depthOrArrayLayers == rhs.depthOrArrayLayers;
|
return lhs.width == rhs.width && lhs.height == rhs.height && lhs.depthOrArrayLayers == rhs.depthOrArrayLayers;
|
||||||
}
|
}
|
||||||
|
static inline bool operator!=(const wgpu::Extent3D& lhs, const wgpu::Extent3D& rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
void resolve_color(const ClipRect& rect, uint32_t bind, GX::TextureFormat fmt, bool clear_depth) noexcept {
|
void resolve_color(const ClipRect& rect, uint32_t bind, GX::TextureFormat fmt, bool clear_depth) noexcept {
|
||||||
if (g_resolvedTextures.size() < bind + 1) {
|
if (g_resolvedTextures.size() < bind + 1) {
|
||||||
|
|
|
@ -147,7 +147,7 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
|
||||||
}
|
}
|
||||||
|
|
||||||
wgpu::RenderPipeline create_pipeline(const State& state, [[maybe_unused]] const PipelineConfig& config) {
|
wgpu::RenderPipeline create_pipeline(const State& state, [[maybe_unused]] const PipelineConfig& config) {
|
||||||
constexpr auto attributes =
|
const auto attributes =
|
||||||
make_vertex_attributes(std::array{wgpu::VertexFormat::Float32x3, wgpu::VertexFormat::Float32x2});
|
make_vertex_attributes(std::array{wgpu::VertexFormat::Float32x3, wgpu::VertexFormat::Float32x2});
|
||||||
const std::array vertexBuffers{make_vertex_buffer_layout(sizeof(Vert), attributes)};
|
const std::array vertexBuffers{make_vertex_buffer_layout(sizeof(Vert), attributes)};
|
||||||
const auto depthStencil = wgpu::DepthStencilState{
|
const auto depthStencil = wgpu::DepthStencilState{
|
||||||
|
|
|
@ -71,7 +71,7 @@ TextureWithSampler create_render_texture(bool multisampled);
|
||||||
|
|
||||||
namespace aurora::gpu::utils {
|
namespace aurora::gpu::utils {
|
||||||
template <auto N>
|
template <auto N>
|
||||||
static constexpr std::array<wgpu::VertexAttribute, N>
|
static std::array<wgpu::VertexAttribute, N>
|
||||||
make_vertex_attributes(std::array<wgpu::VertexFormat, N> formats) {
|
make_vertex_attributes(std::array<wgpu::VertexFormat, N> formats) {
|
||||||
std::array<wgpu::VertexAttribute, N> attributes;
|
std::array<wgpu::VertexAttribute, N> attributes;
|
||||||
uint64_t offset = 0;
|
uint64_t offset = 0;
|
||||||
|
|
Loading…
Reference in New Issue