video_core: Enforce -Wclass-memaccess

This commit is contained in:
ReinUsesLisp 2020-10-02 21:24:22 -03:00
parent 61b246a3a9
commit e1600b0962
2 changed files with 7 additions and 7 deletions

View file

@ -279,5 +279,6 @@ else()
-Werror=switch -Werror=switch
-Werror=unused-variable -Werror=unused-variable
-Werror=unused-but-set-variable -Werror=unused-but-set-variable
-Werror=class-memaccess
) )
endif() endif()

View file

@ -41,30 +41,30 @@ struct Header {
BitField<26, 1, u32> does_load_or_store; BitField<26, 1, u32> does_load_or_store;
BitField<27, 1, u32> does_fp64; BitField<27, 1, u32> does_fp64;
BitField<28, 4, u32> stream_out_mask; BitField<28, 4, u32> stream_out_mask;
} common0{}; } common0;
union { union {
BitField<0, 24, u32> shader_local_memory_low_size; BitField<0, 24, u32> shader_local_memory_low_size;
BitField<24, 8, u32> per_patch_attribute_count; BitField<24, 8, u32> per_patch_attribute_count;
} common1{}; } common1;
union { union {
BitField<0, 24, u32> shader_local_memory_high_size; BitField<0, 24, u32> shader_local_memory_high_size;
BitField<24, 8, u32> threads_per_input_primitive; BitField<24, 8, u32> threads_per_input_primitive;
} common2{}; } common2;
union { union {
BitField<0, 24, u32> shader_local_memory_crs_size; BitField<0, 24, u32> shader_local_memory_crs_size;
BitField<24, 4, OutputTopology> output_topology; BitField<24, 4, OutputTopology> output_topology;
BitField<28, 4, u32> reserved; BitField<28, 4, u32> reserved;
} common3{}; } common3;
union { union {
BitField<0, 12, u32> max_output_vertices; BitField<0, 12, u32> max_output_vertices;
BitField<12, 8, u32> store_req_start; // NOTE: not used by geometry shaders. BitField<12, 8, u32> store_req_start; // NOTE: not used by geometry shaders.
BitField<20, 4, u32> reserved; BitField<20, 4, u32> reserved;
BitField<24, 8, u32> store_req_end; // NOTE: not used by geometry shaders. BitField<24, 8, u32> store_req_end; // NOTE: not used by geometry shaders.
} common4{}; } common4;
union { union {
struct { struct {
@ -145,7 +145,7 @@ struct Header {
} }
} ps; } ps;
std::array<u32, 0xF> raw{}; std::array<u32, 0xF> raw;
}; };
u64 GetLocalMemorySize() const { u64 GetLocalMemorySize() const {
@ -153,7 +153,6 @@ struct Header {
(common2.shader_local_memory_high_size << 24)); (common2.shader_local_memory_high_size << 24));
} }
}; };
static_assert(sizeof(Header) == 0x50, "Incorrect structure size"); static_assert(sizeof(Header) == 0x50, "Incorrect structure size");
} // namespace Tegra::Shader } // namespace Tegra::Shader