Commit Graph
1678 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5 859d09cc75 Vulkan: Two small fixes
The pipeline debug listing printed the color blend factors in the alpha slot,
which is doubly unhelpful since that branch is only taken when the alpha factors
differ from the defaults.

CompileShaderModuleAsync takes ownership of the tag but only deleted it on the
success path, leaking it whenever GLSLtoSPV failed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGz54K3ZXa2Qzyc3aMEYyY
2026-09-04 12:10:03 -06:00
Henrik RydgårdandClaude Opus 5 9273764a3b Vulkan: Don't insert the same key twice when compute pipeline creation fails
The failure branch inserted a null pipeline and then fell through to the normal
insert of the same key, which trips DenseHashMap's duplicate-key assert - and
_assert_msg_ is live in release builds, so a logged error became a crash.

Also skip the null entries when deleting cached pipelines.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGz54K3ZXa2Qzyc3aMEYyY
2026-09-04 12:10:03 -06:00
Henrik RydgårdandClaude Opus 5 41d69e61e1 Vulkan: Set USES_DEPTH_STENCIL/USES_BLEND_CONSTANT before creating the pipeline
They were OR-ed into pipelineFlags just after the CreateGraphicsPipeline call that
consumes them, so the render manager's "don't compile a pipeline that requires
depth for a non-depth renderpass type" check could never fire for game pipelines.
thin3d_vulkan.cpp sets the flag before its call, which is the intended order.

Note this can now legitimately skip some variants when loading the shader cache -
those were invalid combinations that the check was written to reject.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGz54K3ZXa2Qzyc3aMEYyY
2026-09-04 12:10:03 -06:00
Henrik RydgårdandClaude Opus 5 38d5ab657e Vulkan: Disable hardware texture scaling if the constant buffer fails to load
If reading the shader's constant buffer file failed, we'd skip writing descriptor
binding 4 but still dispatch the compute shader, which declares it - a statically
used but unwritten descriptor. It also re-read the missing file on every single
texture upload. Now we drop the scaling shaders instead, so following textures
take the CPU scaling path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGz54K3ZXa2Qzyc3aMEYyY
2026-09-04 12:10:03 -06:00
Henrik RydgårdandClaude Opus 5 79a48c7dbe Vulkan: Fix crash when a replaced texture fails to allocate
The out-of-VRAM retry path cleared plan.replaced but left plan.doReplace set.
GetMipSize() dereferences plan.replaced when doReplace is true, so the fallback
crashed instead of recovering. The common code sets both together.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGz54K3ZXa2Qzyc3aMEYyY
2026-09-04 12:10:03 -06:00
Henrik Rydgård de0dc2d7d4 Remove the leftover geometry shader scaffolding
Nothing has generated or used a geometry shader since the GS paths were removed
- GeometryShaderGenerator is gone, and ShaderWriter's BeginGSMain/EndGSMain had
no callers at all. Removes ShaderStage::Geometry and everything hanging off it:
the GS preambles and GSMain helpers in ShaderWriter, the stage mappings in all
three thin3d backends, the D3D11 geometry shader plumbing (curGS_, the pipeline
and module members, gs_4_0 compilation), CreateGeometryShaderD3D11, the unused
PipelineFlags::USES_GEOMETRY_SHADER and PipelineManagerVulkan's
UsesGeometryShader().

Also stop enabling the Vulkan geometryShader device feature, since we no longer
have any use for it.

Kept on purpose: the device feature is still listed in the feature dumps (like
other capabilities we don't use), and the Vulkan shader cache header keeps its
now-always-zero geometry shader count so the on-disk format stays compatible.
2026-09-03 11:24:03 -06:00
Henrik Rydgård 459f4473af Fix crash in GE debugger
Fixes #22027
2026-08-07 23:49:30 +02:00
Henrik Rydgård 3eb056ad86 Move Common/GraphicsContext.h to Common/GPU/GraphicsContext.h 2026-07-26 13:58:17 +02:00
Henrik Rydgård 6442742f00 Fix issue with insufficient zeroing of VulkanPipelineKey 2026-07-24 12:06:15 +02:00
Henrik Rydgård 986eee7ef3 Remove the global variable "useEmuThread", add some VK error checking for compute shader compiles 2026-07-18 23:45:27 +02:00
Henrik Rydgård cff09041c9 Completely rework the flow in TextureCacheCommon::ApplyTexture 2026-07-18 11:57:48 +02:00
Henrik Rydgård 1ffdc52111 Remove another "next" variable, cleanup 2026-07-18 11:57:48 +02:00
Henrik Rydgård 40bce17f53 Some cleanup 2026-07-16 20:27:44 +02:00
Henrik Rydgård 0528646ea3 Invert the relationship between the two functions 2026-07-16 19:08:18 +02:00
Henrik Rydgård e81055db16 Remove the need to call SetTexture() externally. 2026-07-16 18:32:47 +02:00
Henrik Rydgård b4d1b3d469 Reshuffle so that SetTexture and ApplyTexture are always called together (will merge them later) 2026-07-16 18:23:58 +02:00
Henrik Rydgård 7c73ed71bf Remove the ability to "set safe size" from SoftwareTransformCommon, now redundant 2026-07-16 18:05:59 +02:00
Henrik Rydgård fef50f5348 Remove obsolete software transform vertex decoder hack that forced software skinning 2026-07-16 17:52:14 +02:00
Henrik Rydgård 92ec6a992b Remove "pixelMapped" from gstate_c. 2026-07-16 17:45:22 +02:00
Henrik Rydgård 6f4f0c41b4 Split ApplyTexture into ApplyTexture and ApplySampler 2026-07-16 17:45:22 +02:00
Henrik Rydgård 2e012b8966 Unify the "BindSampler" function between the backends 2026-07-16 17:45:22 +02:00
Henrik Rydgård 66014870d2 Remove unnecessary "DirtyLastShader" mechanism. 2026-07-16 15:47:59 +02:00
Henrik Rydgård 57e6bafb62 Remove largely ineffective and nearly not functional "low memory mode". Unlikely to save us. 2026-07-16 15:28:40 +02:00
Henrik Rydgård 672b549109 Make GetFramebufferSamplingParams a loose function. 2026-07-16 15:28:33 +02:00
Henrik Rydgård d2ae8af2bf Start splitting apart Texture vs Sampler binding code 2026-07-16 15:03:23 +02:00
Henrik Rydgård ea95eb420d Clean up GetFramebufferSamplingParams 2026-07-16 15:03:20 +02:00
Henrik Rydgård c3eafeb005 Remove obsolete vertex decoder code and options 2026-07-14 17:26:00 +02:00
Henrik Rydgård cd40e2d4f0 Delete more code related to hardware skinning 2026-07-14 17:17:40 +02:00
Henrik Rydgård 61e1ef8f7a Remove the "Software skinning" option. Now always on. 2026-07-14 17:02:57 +02:00
Henrik Rydgård 497baecc9e Correct OnVkey locking on PauseScreen as well 2026-07-12 11:31:29 +02:00
Henrik Rydgård 28b2b1793b Pipeline checker: Add support for checking for identical pipelines with different vertex formats
This turned out not to be very fruitful.
2026-07-10 19:07:27 +02:00
Henrik Rydgård a207a46fba VertexShaderGenerator: The hasColor bit is only relevant in hw transform. 2026-07-10 12:49:57 +02:00
Henrik Rydgård aab24e67e4 Add a crude pipeline difference analyzer, to see what shaders it may payoff to merge. 2026-07-10 12:11:17 +02:00
Henrik Rydgård a9c156804a More simplification falling out from the previous change 2026-07-09 18:50:34 +02:00
Henrik Rydgård d70697d3ae Vulkan simplification: in PipelineCacheKey, use shader IDs instead of pointers to shaders. 2026-07-09 18:40:58 +02:00
Henrik Rydgård 9e687c3282 Make Description a member function of VShaderID / FShaderID. Assorted cleanup 2026-07-09 17:46:07 +02:00
Henrik Rydgård 5f7281bd8e Remove old vestiges of geometry shader support 2026-07-08 18:25:08 +02:00
Henrik Rydgård 0c7ff6000d Remove geometry shader tab from DevScreens.cpp 2026-07-08 18:25:08 +02:00
Henrik Rydgård 2e9ee49679 Reorganize the FS shader bits too, for a better sort order in the shader viewer 2026-07-07 20:16:37 +02:00
Henrik Rydgård 93b570f8c7 Reverse the bits so we actually get the desired shader sorting order in the debug shader viewer 2026-07-07 20:16:37 +02:00
Henrik Rydgård 6508ae0aae Reorganize the vertex ShaderId bits, better sorting order 2026-07-07 20:16:32 +02:00
Henrik Rydgård ebc564a465 Centralize handling of another GPU flag 2026-06-27 13:50:03 +02:00
Henrik Rydgård d2f1193afc Remove another unused GPU_USE_* flag 2026-06-27 13:19:13 +02:00
Henrik Rydgård a4d21d23bb Remove some remains of HW tessellation 2026-06-26 18:53:35 +02:00
Henrik Rydgård 7b3405ab86 Fix a Vulkan lifetime issue causing invalid descriptors on shutdown
Also simplifies the code a little
2026-06-25 21:56:33 +02:00
Henrik Rydgård 623545bd24 Delete the "Hardware tessellation" feature.
Very hard to maintain and debug, not worth it.
2026-06-16 16:17:14 +02:00
Henrik Rydgård 64e55324c7 Fix initialization bug in TextureCacheCommon 2026-06-14 14:02:09 +02:00
Henrik Rydgård e0634f3df9 Assorted cleanup and tweaks 2026-06-13 13:34:41 +02:00
Henrik Rydgård 87cc608df1 Add the necessary logic to use in-shader CLUT lookups for regular textures 2026-06-11 12:42:16 +02:00
Henrik Rydgård 0bf1d12053 Prepare for shader depal (CLUT palette lookup) for ordinary textures 2026-06-11 11:58:58 +02:00