diff options
| author | 2020-02-29 04:03:22 -0300 | |
|---|---|---|
| committer | 2020-03-09 18:40:07 -0300 | |
| commit | 66a8a3e88719aaa65a96dd0289e1fb151d199d9b (patch) | |
| tree | 63af86085bf2a0b98023aae5ba3982fa82998f99 /src | |
| parent | shader/registry: Store graphics and compute metadata (diff) | |
| download | yuzu-66a8a3e88719aaa65a96dd0289e1fb151d199d9b.tar.gz yuzu-66a8a3e88719aaa65a96dd0289e1fb151d199d9b.tar.xz yuzu-66a8a3e88719aaa65a96dd0289e1fb151d199d9b.zip | |
shader/registry: Cache tessellation state
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/shader/registry.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/shader/registry.h | 8 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp index 5d5118058..df86c0cc3 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | |||
| @@ -48,7 +48,7 @@ struct BindlessSamplerKey { | |||
| 48 | Tegra::Engines::SamplerDescriptor sampler; | 48 | Tegra::Engines::SamplerDescriptor sampler; |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | constexpr u32 NativeVersion = 17; | 51 | constexpr u32 NativeVersion = 18; |
| 52 | 52 | ||
| 53 | ShaderCacheVersionHash GetShaderCacheVersionHash() { | 53 | ShaderCacheVersionHash GetShaderCacheVersionHash() { |
| 54 | ShaderCacheVersionHash hash{}; | 54 | ShaderCacheVersionHash hash{}; |
diff --git a/src/video_core/shader/registry.cpp b/src/video_core/shader/registry.cpp index dc2d3dce3..90dfab293 100644 --- a/src/video_core/shader/registry.cpp +++ b/src/video_core/shader/registry.cpp | |||
| @@ -27,6 +27,9 @@ GraphicsInfo MakeGraphicsInfo(ShaderType shader_stage, ConstBufferEngineInterfac | |||
| 27 | 27 | ||
| 28 | GraphicsInfo info; | 28 | GraphicsInfo info; |
| 29 | info.primitive_topology = graphics.regs.draw.topology; | 29 | info.primitive_topology = graphics.regs.draw.topology; |
| 30 | info.tessellation_primitive = graphics.regs.tess_mode.prim; | ||
| 31 | info.tessellation_spacing = graphics.regs.tess_mode.spacing; | ||
| 32 | info.tessellation_clockwise = graphics.regs.tess_mode.cw; | ||
| 30 | return info; | 33 | return info; |
| 31 | } | 34 | } |
| 32 | 35 | ||
diff --git a/src/video_core/shader/registry.h b/src/video_core/shader/registry.h index c1a04ea02..7b7fad3d1 100644 --- a/src/video_core/shader/registry.h +++ b/src/video_core/shader/registry.h | |||
| @@ -26,15 +26,19 @@ using BindlessSamplerMap = | |||
| 26 | 26 | ||
| 27 | struct GraphicsInfo { | 27 | struct GraphicsInfo { |
| 28 | Tegra::Engines::Maxwell3D::Regs::PrimitiveTopology primitive_topology{}; | 28 | Tegra::Engines::Maxwell3D::Regs::PrimitiveTopology primitive_topology{}; |
| 29 | Tegra::Engines::Maxwell3D::Regs::TessellationPrimitive tessellation_primitive{}; | ||
| 30 | Tegra::Engines::Maxwell3D::Regs::TessellationSpacing tessellation_spacing{}; | ||
| 31 | bool tessellation_clockwise = false; | ||
| 29 | }; | 32 | }; |
| 30 | static_assert(std::is_trivially_copyable_v<GraphicsInfo>); | 33 | static_assert(std::is_trivially_copyable_v<GraphicsInfo> && |
| 34 | std::is_standard_layout_v<GraphicsInfo>); | ||
| 31 | 35 | ||
| 32 | struct ComputeInfo { | 36 | struct ComputeInfo { |
| 33 | std::array<u32, 3> workgroup_size{}; | 37 | std::array<u32, 3> workgroup_size{}; |
| 34 | u32 shared_memory_size_in_words = 0; | 38 | u32 shared_memory_size_in_words = 0; |
| 35 | u32 local_memory_size_in_words = 0; | 39 | u32 local_memory_size_in_words = 0; |
| 36 | }; | 40 | }; |
| 37 | static_assert(std::is_trivially_copyable_v<ComputeInfo>); | 41 | static_assert(std::is_trivially_copyable_v<ComputeInfo> && std::is_standard_layout_v<ComputeInfo>); |
| 38 | 42 | ||
| 39 | struct SerializedRegistryInfo { | 43 | struct SerializedRegistryInfo { |
| 40 | VideoCore::GuestDriverProfile guest_driver_profile; | 44 | VideoCore::GuestDriverProfile guest_driver_profile; |