summaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/maxwell_to_vk.cpp37
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp2
-rw-r--r--src/video_core/renderer_vulkan/vk_shader_decompiler.cpp8
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.cpp4
4 files changed, 24 insertions, 27 deletions
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
index d22de1d81..58e117eb3 100644
--- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
+++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
@@ -26,7 +26,7 @@ VkFilter Filter(Tegra::Texture::TextureFilter filter) {
26 case Tegra::Texture::TextureFilter::Linear: 26 case Tegra::Texture::TextureFilter::Linear:
27 return VK_FILTER_LINEAR; 27 return VK_FILTER_LINEAR;
28 } 28 }
29 UNREACHABLE_MSG("Invalid sampler filter={}", static_cast<u32>(filter)); 29 UNREACHABLE_MSG("Invalid sampler filter={}", filter);
30 return {}; 30 return {};
31} 31}
32 32
@@ -43,7 +43,7 @@ VkSamplerMipmapMode MipmapMode(Tegra::Texture::TextureMipmapFilter mipmap_filter
43 case Tegra::Texture::TextureMipmapFilter::Linear: 43 case Tegra::Texture::TextureMipmapFilter::Linear:
44 return VK_SAMPLER_MIPMAP_MODE_LINEAR; 44 return VK_SAMPLER_MIPMAP_MODE_LINEAR;
45 } 45 }
46 UNREACHABLE_MSG("Invalid sampler mipmap mode={}", static_cast<u32>(mipmap_filter)); 46 UNREACHABLE_MSG("Invalid sampler mipmap mode={}", mipmap_filter);
47 return {}; 47 return {};
48} 48}
49 49
@@ -79,7 +79,7 @@ VkSamplerAddressMode WrapMode(const VKDevice& device, Tegra::Texture::WrapMode w
79 UNIMPLEMENTED(); 79 UNIMPLEMENTED();
80 return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; 80 return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE;
81 default: 81 default:
82 UNIMPLEMENTED_MSG("Unimplemented wrap mode={}", static_cast<u32>(wrap_mode)); 82 UNIMPLEMENTED_MSG("Unimplemented wrap mode={}", wrap_mode);
83 return {}; 83 return {};
84 } 84 }
85} 85}
@@ -103,8 +103,7 @@ VkCompareOp DepthCompareFunction(Tegra::Texture::DepthCompareFunc depth_compare_
103 case Tegra::Texture::DepthCompareFunc::Always: 103 case Tegra::Texture::DepthCompareFunc::Always:
104 return VK_COMPARE_OP_ALWAYS; 104 return VK_COMPARE_OP_ALWAYS;
105 } 105 }
106 UNIMPLEMENTED_MSG("Unimplemented sampler depth compare function={}", 106 UNIMPLEMENTED_MSG("Unimplemented sampler depth compare function={}", depth_compare_func);
107 static_cast<u32>(depth_compare_func));
108 return {}; 107 return {};
109} 108}
110 109
@@ -228,8 +227,7 @@ FormatInfo SurfaceFormat(const VKDevice& device, FormatType format_type, PixelFo
228 227
229 auto tuple = tex_format_tuples[static_cast<std::size_t>(pixel_format)]; 228 auto tuple = tex_format_tuples[static_cast<std::size_t>(pixel_format)];
230 if (tuple.format == VK_FORMAT_UNDEFINED) { 229 if (tuple.format == VK_FORMAT_UNDEFINED) {
231 UNIMPLEMENTED_MSG("Unimplemented texture format with pixel format={}", 230 UNIMPLEMENTED_MSG("Unimplemented texture format with pixel format={}", pixel_format);
232 static_cast<u32>(pixel_format));
233 return {VK_FORMAT_A8B8G8R8_UNORM_PACK32, true, true}; 231 return {VK_FORMAT_A8B8G8R8_UNORM_PACK32, true, true};
234 } 232 }
235 233
@@ -275,7 +273,7 @@ VkShaderStageFlagBits ShaderStage(Tegra::Engines::ShaderType stage) {
275 case Tegra::Engines::ShaderType::Compute: 273 case Tegra::Engines::ShaderType::Compute:
276 return VK_SHADER_STAGE_COMPUTE_BIT; 274 return VK_SHADER_STAGE_COMPUTE_BIT;
277 } 275 }
278 UNIMPLEMENTED_MSG("Unimplemented shader stage={}", static_cast<u32>(stage)); 276 UNIMPLEMENTED_MSG("Unimplemented shader stage={}", stage);
279 return {}; 277 return {};
280} 278}
281 279
@@ -300,7 +298,7 @@ VkPrimitiveTopology PrimitiveTopology([[maybe_unused]] const VKDevice& device,
300 case Maxwell::PrimitiveTopology::Patches: 298 case Maxwell::PrimitiveTopology::Patches:
301 return VK_PRIMITIVE_TOPOLOGY_PATCH_LIST; 299 return VK_PRIMITIVE_TOPOLOGY_PATCH_LIST;
302 default: 300 default:
303 UNIMPLEMENTED_MSG("Unimplemented topology={}", static_cast<u32>(topology)); 301 UNIMPLEMENTED_MSG("Unimplemented topology={}", topology);
304 return {}; 302 return {};
305 } 303 }
306} 304}
@@ -490,8 +488,7 @@ VkFormat VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttrib
490 } 488 }
491 break; 489 break;
492 } 490 }
493 UNIMPLEMENTED_MSG("Unimplemented vertex format of type={} and size={}", static_cast<u32>(type), 491 UNIMPLEMENTED_MSG("Unimplemented vertex format of type={} and size={}", type, size);
494 static_cast<u32>(size));
495 return {}; 492 return {};
496} 493}
497 494
@@ -522,7 +519,7 @@ VkCompareOp ComparisonOp(Maxwell::ComparisonOp comparison) {
522 case Maxwell::ComparisonOp::AlwaysOld: 519 case Maxwell::ComparisonOp::AlwaysOld:
523 return VK_COMPARE_OP_ALWAYS; 520 return VK_COMPARE_OP_ALWAYS;
524 } 521 }
525 UNIMPLEMENTED_MSG("Unimplemented comparison op={}", static_cast<u32>(comparison)); 522 UNIMPLEMENTED_MSG("Unimplemented comparison op={}", comparison);
526 return {}; 523 return {};
527} 524}
528 525
@@ -539,7 +536,7 @@ VkIndexType IndexFormat(const VKDevice& device, Maxwell::IndexFormat index_forma
539 case Maxwell::IndexFormat::UnsignedInt: 536 case Maxwell::IndexFormat::UnsignedInt:
540 return VK_INDEX_TYPE_UINT32; 537 return VK_INDEX_TYPE_UINT32;
541 } 538 }
542 UNIMPLEMENTED_MSG("Unimplemented index_format={}", static_cast<u32>(index_format)); 539 UNIMPLEMENTED_MSG("Unimplemented index_format={}", index_format);
543 return {}; 540 return {};
544} 541}
545 542
@@ -570,7 +567,7 @@ VkStencilOp StencilOp(Maxwell::StencilOp stencil_op) {
570 case Maxwell::StencilOp::DecrWrapOGL: 567 case Maxwell::StencilOp::DecrWrapOGL:
571 return VK_STENCIL_OP_DECREMENT_AND_WRAP; 568 return VK_STENCIL_OP_DECREMENT_AND_WRAP;
572 } 569 }
573 UNIMPLEMENTED_MSG("Unimplemented stencil op={}", static_cast<u32>(stencil_op)); 570 UNIMPLEMENTED_MSG("Unimplemented stencil op={}", stencil_op);
574 return {}; 571 return {};
575} 572}
576 573
@@ -592,7 +589,7 @@ VkBlendOp BlendEquation(Maxwell::Blend::Equation equation) {
592 case Maxwell::Blend::Equation::MaxGL: 589 case Maxwell::Blend::Equation::MaxGL:
593 return VK_BLEND_OP_MAX; 590 return VK_BLEND_OP_MAX;
594 } 591 }
595 UNIMPLEMENTED_MSG("Unimplemented blend equation={}", static_cast<u32>(equation)); 592 UNIMPLEMENTED_MSG("Unimplemented blend equation={}", equation);
596 return {}; 593 return {};
597} 594}
598 595
@@ -656,7 +653,7 @@ VkBlendFactor BlendFactor(Maxwell::Blend::Factor factor) {
656 case Maxwell::Blend::Factor::OneMinusConstantAlphaGL: 653 case Maxwell::Blend::Factor::OneMinusConstantAlphaGL:
657 return VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA; 654 return VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA;
658 } 655 }
659 UNIMPLEMENTED_MSG("Unimplemented blend factor={}", static_cast<u32>(factor)); 656 UNIMPLEMENTED_MSG("Unimplemented blend factor={}", factor);
660 return {}; 657 return {};
661} 658}
662 659
@@ -667,7 +664,7 @@ VkFrontFace FrontFace(Maxwell::FrontFace front_face) {
667 case Maxwell::FrontFace::CounterClockWise: 664 case Maxwell::FrontFace::CounterClockWise:
668 return VK_FRONT_FACE_COUNTER_CLOCKWISE; 665 return VK_FRONT_FACE_COUNTER_CLOCKWISE;
669 } 666 }
670 UNIMPLEMENTED_MSG("Unimplemented front face={}", static_cast<u32>(front_face)); 667 UNIMPLEMENTED_MSG("Unimplemented front face={}", front_face);
671 return {}; 668 return {};
672} 669}
673 670
@@ -680,7 +677,7 @@ VkCullModeFlags CullFace(Maxwell::CullFace cull_face) {
680 case Maxwell::CullFace::FrontAndBack: 677 case Maxwell::CullFace::FrontAndBack:
681 return VK_CULL_MODE_FRONT_AND_BACK; 678 return VK_CULL_MODE_FRONT_AND_BACK;
682 } 679 }
683 UNIMPLEMENTED_MSG("Unimplemented cull face={}", static_cast<u32>(cull_face)); 680 UNIMPLEMENTED_MSG("Unimplemented cull face={}", cull_face);
684 return {}; 681 return {};
685} 682}
686 683
@@ -700,7 +697,7 @@ VkComponentSwizzle SwizzleSource(Tegra::Texture::SwizzleSource swizzle) {
700 case Tegra::Texture::SwizzleSource::OneFloat: 697 case Tegra::Texture::SwizzleSource::OneFloat:
701 return VK_COMPONENT_SWIZZLE_ONE; 698 return VK_COMPONENT_SWIZZLE_ONE;
702 } 699 }
703 UNIMPLEMENTED_MSG("Unimplemented swizzle source={}", static_cast<u32>(swizzle)); 700 UNIMPLEMENTED_MSG("Unimplemented swizzle source={}", swizzle);
704 return {}; 701 return {};
705} 702}
706 703
@@ -723,7 +720,7 @@ VkViewportCoordinateSwizzleNV ViewportSwizzle(Maxwell::ViewportSwizzle swizzle)
723 case Maxwell::ViewportSwizzle::NegativeW: 720 case Maxwell::ViewportSwizzle::NegativeW:
724 return VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV; 721 return VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV;
725 } 722 }
726 UNREACHABLE_MSG("Invalid swizzle={}", static_cast<int>(swizzle)); 723 UNREACHABLE_MSG("Invalid swizzle={}", swizzle);
727 return {}; 724 return {};
728} 725}
729 726
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
index 39e58a56f..3fb264d03 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
@@ -75,7 +75,7 @@ ShaderType GetShaderType(Maxwell::ShaderProgram program) {
75 case Maxwell::ShaderProgram::Fragment: 75 case Maxwell::ShaderProgram::Fragment:
76 return ShaderType::Fragment; 76 return ShaderType::Fragment;
77 default: 77 default:
78 UNIMPLEMENTED_MSG("program={}", static_cast<u32>(program)); 78 UNIMPLEMENTED_MSG("program={}", program);
79 return ShaderType::Vertex; 79 return ShaderType::Vertex;
80 } 80 }
81} 81}
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
index 7b0169acd..5748eab3a 100644
--- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
+++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
@@ -114,7 +114,7 @@ spv::Dim GetSamplerDim(const Sampler& sampler) {
114 case Tegra::Shader::TextureType::TextureCube: 114 case Tegra::Shader::TextureType::TextureCube:
115 return spv::Dim::Cube; 115 return spv::Dim::Cube;
116 default: 116 default:
117 UNIMPLEMENTED_MSG("Unimplemented sampler type={}", static_cast<int>(sampler.type)); 117 UNIMPLEMENTED_MSG("Unimplemented sampler type={}", sampler.type);
118 return spv::Dim::Dim2D; 118 return spv::Dim::Dim2D;
119 } 119 }
120} 120}
@@ -134,7 +134,7 @@ std::pair<spv::Dim, bool> GetImageDim(const Image& image) {
134 case Tegra::Shader::ImageType::Texture3D: 134 case Tegra::Shader::ImageType::Texture3D:
135 return {spv::Dim::Dim3D, false}; 135 return {spv::Dim::Dim3D, false};
136 default: 136 default:
137 UNIMPLEMENTED_MSG("Unimplemented image type={}", static_cast<int>(image.type)); 137 UNIMPLEMENTED_MSG("Unimplemented image type={}", image.type);
138 return {spv::Dim::Dim2D, false}; 138 return {spv::Dim::Dim2D, false};
139 } 139 }
140} 140}
@@ -1254,7 +1254,7 @@ private:
1254 const Id pointer = ArrayPass(type_descriptor.scalar, attribute_id, elements); 1254 const Id pointer = ArrayPass(type_descriptor.scalar, attribute_id, elements);
1255 return {OpLoad(GetTypeDefinition(type), pointer), type}; 1255 return {OpLoad(GetTypeDefinition(type), pointer), type};
1256 } 1256 }
1257 UNIMPLEMENTED_MSG("Unhandled input attribute: {}", static_cast<u32>(attribute)); 1257 UNIMPLEMENTED_MSG("Unhandled input attribute: {}", attribute);
1258 return {v_float_zero, Type::Float}; 1258 return {v_float_zero, Type::Float};
1259 } 1259 }
1260 1260
@@ -1890,7 +1890,7 @@ private:
1890 case Tegra::Shader::TextureType::Texture3D: 1890 case Tegra::Shader::TextureType::Texture3D:
1891 return 3; 1891 return 3;
1892 default: 1892 default:
1893 UNREACHABLE_MSG("Invalid texture type={}", static_cast<int>(type)); 1893 UNREACHABLE_MSG("Invalid texture type={}", type);
1894 return 2; 1894 return 2;
1895 } 1895 }
1896 }(); 1896 }();
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index 1ff109880..ae2e3322c 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -52,7 +52,7 @@ VkImageType SurfaceTargetToImage(SurfaceTarget target) {
52 UNREACHABLE(); 52 UNREACHABLE();
53 return {}; 53 return {};
54 } 54 }
55 UNREACHABLE_MSG("Unknown texture target={}", static_cast<u32>(target)); 55 UNREACHABLE_MSG("Unknown texture target={}", target);
56 return {}; 56 return {};
57} 57}
58 58
@@ -64,7 +64,7 @@ VkImageAspectFlags PixelFormatToImageAspect(PixelFormat pixel_format) {
64 } else if (pixel_format < PixelFormat::MaxDepthStencilFormat) { 64 } else if (pixel_format < PixelFormat::MaxDepthStencilFormat) {
65 return VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; 65 return VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
66 } else { 66 } else {
67 UNREACHABLE_MSG("Invalid pixel format={}", static_cast<int>(pixel_format)); 67 UNREACHABLE_MSG("Invalid pixel format={}", pixel_format);
68 return VK_IMAGE_ASPECT_COLOR_BIT; 68 return VK_IMAGE_ASPECT_COLOR_BIT;
69 } 69 }
70} 70}