diff options
Diffstat (limited to 'src/video_core/renderer_vulkan')
4 files changed, 11 insertions, 11 deletions
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index 8f0b0b8ec..8f9b9a11a 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp | |||
| @@ -266,19 +266,20 @@ FormatInfo SurfaceFormat(const Device& device, FormatType format_type, bool with | |||
| 266 | return {device.GetSupportedFormat(tuple.format, usage, format_type), attachable, storage}; | 266 | return {device.GetSupportedFormat(tuple.format, usage, format_type), attachable, storage}; |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | VkShaderStageFlagBits ShaderStage(Tegra::Engines::ShaderType stage) { | 269 | VkShaderStageFlagBits ShaderStage(Shader::Stage stage) { |
| 270 | switch (stage) { | 270 | switch (stage) { |
| 271 | case Tegra::Engines::ShaderType::Vertex: | 271 | case Shader::Stage::VertexA: |
| 272 | case Shader::Stage::VertexB: | ||
| 272 | return VK_SHADER_STAGE_VERTEX_BIT; | 273 | return VK_SHADER_STAGE_VERTEX_BIT; |
| 273 | case Tegra::Engines::ShaderType::TesselationControl: | 274 | case Shader::Stage::TessellationControl: |
| 274 | return VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT; | 275 | return VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT; |
| 275 | case Tegra::Engines::ShaderType::TesselationEval: | 276 | case Shader::Stage::TessellationEval: |
| 276 | return VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT; | 277 | return VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT; |
| 277 | case Tegra::Engines::ShaderType::Geometry: | 278 | case Shader::Stage::Geometry: |
| 278 | return VK_SHADER_STAGE_GEOMETRY_BIT; | 279 | return VK_SHADER_STAGE_GEOMETRY_BIT; |
| 279 | case Tegra::Engines::ShaderType::Fragment: | 280 | case Shader::Stage::Fragment: |
| 280 | return VK_SHADER_STAGE_FRAGMENT_BIT; | 281 | return VK_SHADER_STAGE_FRAGMENT_BIT; |
| 281 | case Tegra::Engines::ShaderType::Compute: | 282 | case Shader::Stage::Compute: |
| 282 | return VK_SHADER_STAGE_COMPUTE_BIT; | 283 | return VK_SHADER_STAGE_COMPUTE_BIT; |
| 283 | } | 284 | } |
| 284 | UNIMPLEMENTED_MSG("Unimplemented shader stage={}", stage); | 285 | UNIMPLEMENTED_MSG("Unimplemented shader stage={}", stage); |
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.h b/src/video_core/renderer_vulkan/maxwell_to_vk.h index 50a599c11..8a9616039 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.h +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 8 | #include "shader_recompiler/stage.h" | ||
| 8 | #include "video_core/engines/maxwell_3d.h" | 9 | #include "video_core/engines/maxwell_3d.h" |
| 9 | #include "video_core/surface.h" | 10 | #include "video_core/surface.h" |
| 10 | #include "video_core/textures/texture.h" | 11 | #include "video_core/textures/texture.h" |
| @@ -45,7 +46,7 @@ struct FormatInfo { | |||
| 45 | [[nodiscard]] FormatInfo SurfaceFormat(const Device& device, FormatType format_type, bool with_srgb, | 46 | [[nodiscard]] FormatInfo SurfaceFormat(const Device& device, FormatType format_type, bool with_srgb, |
| 46 | PixelFormat pixel_format); | 47 | PixelFormat pixel_format); |
| 47 | 48 | ||
| 48 | VkShaderStageFlagBits ShaderStage(Tegra::Engines::ShaderType stage); | 49 | VkShaderStageFlagBits ShaderStage(Shader::Stage stage); |
| 49 | 50 | ||
| 50 | VkPrimitiveTopology PrimitiveTopology(const Device& device, Maxwell::PrimitiveTopology topology); | 51 | VkPrimitiveTopology PrimitiveTopology(const Device& device, Maxwell::PrimitiveTopology topology); |
| 51 | 52 | ||
diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 2b59a9d88..9eb353a88 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | |||
| @@ -737,7 +737,7 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { | |||
| 737 | .sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, | 737 | .sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, |
| 738 | .pNext = nullptr, | 738 | .pNext = nullptr, |
| 739 | .flags = 0, | 739 | .flags = 0, |
| 740 | .stage = MaxwellToVK::ShaderStage(static_cast<Tegra::Engines::ShaderType>(stage)), | 740 | .stage = MaxwellToVK::ShaderStage(Shader::StageFromIndex(stage)), |
| 741 | .module = *spv_modules[stage], | 741 | .module = *spv_modules[stage], |
| 742 | .pName = "main", | 742 | .pName = "main", |
| 743 | .pSpecializationInfo = nullptr, | 743 | .pSpecializationInfo = nullptr, |
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index c57e16c50..f04c3394c 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp | |||
| @@ -58,8 +58,6 @@ struct DrawParams { | |||
| 58 | bool is_indexed; | 58 | bool is_indexed; |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | constexpr auto COMPUTE_SHADER_INDEX = static_cast<size_t>(Tegra::Engines::ShaderType::Compute); | ||
| 62 | |||
| 63 | VkViewport GetViewportState(const Device& device, const Maxwell& regs, size_t index) { | 61 | VkViewport GetViewportState(const Device& device, const Maxwell& regs, size_t index) { |
| 64 | const auto& src = regs.viewport_transform[index]; | 62 | const auto& src = regs.viewport_transform[index]; |
| 65 | const float width = src.scale_x * 2.0f; | 63 | const float width = src.scale_x * 2.0f; |