summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-10-10 08:38:02 +0200
committerGitHub <noreply@github.com>2020-10-10 08:38:02 +0200
commit419a59a7b1d076c0afc216817dbb9ad17d04b77e (patch)
tree1f066b2cc437e6dac721f5c02a9e92e7cf3fdba2 /src
parentMerge pull request #4757 from german77/BetterMotion (diff)
parentvideo_core: Enforce -Wclass-memaccess (diff)
downloadyuzu-419a59a7b1d076c0afc216817dbb9ad17d04b77e.tar
yuzu-419a59a7b1d076c0afc216817dbb9ad17d04b77e.tar.gz
yuzu-419a59a7b1d076c0afc216817dbb9ad17d04b77e.tar.bz2
yuzu-419a59a7b1d076c0afc216817dbb9ad17d04b77e.tar.lz
yuzu-419a59a7b1d076c0afc216817dbb9ad17d04b77e.tar.xz
yuzu-419a59a7b1d076c0afc216817dbb9ad17d04b77e.tar.zst
yuzu-419a59a7b1d076c0afc216817dbb9ad17d04b77e.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/CMakeLists.txt1
-rw-r--r--src/video_core/engines/shader_header.h13
2 files changed, 7 insertions, 7 deletions
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt
index 2be455679..3df54816d 100644
--- a/src/video_core/CMakeLists.txt
+++ b/src/video_core/CMakeLists.txt
@@ -279,5 +279,6 @@ else()
-Werror=switch
-Werror=unused-variable
-Werror=unused-but-set-variable
+ -Werror=class-memaccess
)
endif()
diff --git a/src/video_core/engines/shader_header.h b/src/video_core/engines/shader_header.h
index 72e2a33d5..ceec05459 100644
--- a/src/video_core/engines/shader_header.h
+++ b/src/video_core/engines/shader_header.h
@@ -41,30 +41,30 @@ struct Header {
BitField<26, 1, u32> does_load_or_store;
BitField<27, 1, u32> does_fp64;
BitField<28, 4, u32> stream_out_mask;
- } common0{};
+ } common0;
union {
BitField<0, 24, u32> shader_local_memory_low_size;
BitField<24, 8, u32> per_patch_attribute_count;
- } common1{};
+ } common1;
union {
BitField<0, 24, u32> shader_local_memory_high_size;
BitField<24, 8, u32> threads_per_input_primitive;
- } common2{};
+ } common2;
union {
BitField<0, 24, u32> shader_local_memory_crs_size;
BitField<24, 4, OutputTopology> output_topology;
BitField<28, 4, u32> reserved;
- } common3{};
+ } common3;
union {
BitField<0, 12, u32> max_output_vertices;
BitField<12, 8, u32> store_req_start; // NOTE: not used by geometry shaders.
BitField<20, 4, u32> reserved;
BitField<24, 8, u32> store_req_end; // NOTE: not used by geometry shaders.
- } common4{};
+ } common4;
union {
struct {
@@ -145,7 +145,7 @@ struct Header {
}
} ps;
- std::array<u32, 0xF> raw{};
+ std::array<u32, 0xF> raw;
};
u64 GetLocalMemorySize() const {
@@ -153,7 +153,6 @@ struct Header {
(common2.shader_local_memory_high_size << 24));
}
};
-
static_assert(sizeof(Header) == 0x50, "Incorrect structure size");
} // namespace Tegra::Shader