Final(?) GCC 9 fixes

This commit is contained in:
Luke Street 2022-06-13 15:51:52 -07:00
parent f0936a7fb0
commit 25a0fe4a73
4 changed files with 8 additions and 4 deletions

View File

@ -60,7 +60,6 @@ class CCameraShakeData {
public:
static const CCameraShakeData skChargedShotCameraShakeData;
constexpr CCameraShakeData() = default;
constexpr CCameraShakeData(float duration, float sfxDist, u32 flags, const zeus::CVector3f& sfxPos,
const CCameraShakerComponent& shaker1, const CCameraShakerComponent& shaker2,
const CCameraShakerComponent& shaker3) noexcept

View File

@ -71,6 +71,7 @@ struct Command {
return left == rhs.left && top == rhs.top && width == rhs.width && height == rhs.height && znear == rhs.znear &&
zfar == rhs.zfar;
}
bool operator!=(const SetViewportCommand& rhs) const { return !(*this == rhs); }
} setViewport;
struct SetScissorCommand {
uint32_t x;
@ -81,6 +82,7 @@ struct Command {
bool operator==(const SetScissorCommand& rhs) const {
return x == rhs.x && y == rhs.y && w == rhs.w && h == rhs.h;
}
bool operator!=(const SetScissorCommand& rhs) const { return !(*this == rhs); }
} setScissor;
ShaderDrawCommand draw;
} 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;
}
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 {
if (g_resolvedTextures.size() < bind + 1) {

View File

@ -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) {
constexpr auto attributes =
const auto attributes =
make_vertex_attributes(std::array{wgpu::VertexFormat::Float32x3, wgpu::VertexFormat::Float32x2});
const std::array vertexBuffers{make_vertex_buffer_layout(sizeof(Vert), attributes)};
const auto depthStencil = wgpu::DepthStencilState{

View File

@ -71,7 +71,7 @@ TextureWithSampler create_render_texture(bool multisampled);
namespace aurora::gpu::utils {
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) {
std::array<wgpu::VertexAttribute, N> attributes;
uint64_t offset = 0;