RyuKen/Ryujinx.Graphics.GAL/Multithreading/Commands
riperiperi 79adba4402
Add support for render scale to vertex stage. (#2763)
* Add support for render scale to vertex stage.

Occasionally games read off textureSize on the vertex stage to inform the fragment shader what size a texture is without querying in there. Scales were not present in the vertex shader to correct the sizes, so games were providing the raw upscaled texture size to the fragment shader, which was incorrect.

One downside is that the fragment and vertex support buffer description must be identical, so the full size scales array must be defined when used. I don't think this will have an impact though. Another is that the fragment texture count must be updated when vertex shader textures are used. I'd like to correct this so that the update is folded into the update for the scales.

Also cleans up a bunch of things, like it making no sense to call CommitRenderScale for each stage.

Fixes render scale causing a weird offset bloom in Super Mario Party and Clubhouse Games. Clubhouse Games still has a pixelated look in a number of its games due to something else it does in the shader.

* Split out support buffer update, lazy updates.

* Commit support buffer before compute dispatch

* Remove unnecessary qualifier.

* Address Feedback
2022-01-08 14:48:48 -03:00
..
Buffer Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
CounterEvent Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
Program Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
Renderer Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
Sampler Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
Shader Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
Texture Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
Window Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
BarrierCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
BeginTransformFeedbackCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
ClearBufferCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
ClearRenderTargetColorCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
ClearRenderTargetDepthStencilCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
CommandBufferBarrierCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
CopyBufferCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
DispatchComputeCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
DrawCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
DrawIndexedCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
DrawTextureCommand.cs Implement DrawTexture functionality (#2747) 2021-11-10 15:37:49 -03:00
EndHostConditionalRenderingCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
EndTransformFeedbackCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
IGALCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
MultiDrawIndexedIndirectCountCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
MultiDrawIndirectCountCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetAlphaTestCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetBlendStateCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetDepthBiasCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetDepthClampCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetDepthModeCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetDepthTestCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetFaceCullingCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetFrontFaceCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetImageCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetIndexBufferCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetLineParametersCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetLogicOpStateCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetPatchParametersCommand.cs Initial tessellation shader support (#2534) 2021-10-18 18:38:04 -03:00
SetPointParametersCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetPolygonModeCommand.cs Initial tessellation shader support (#2534) 2021-10-18 18:38:04 -03:00
SetPrimitiveRestartCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetPrimitiveTopologyCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetProgramCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetRasterizerDiscardCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetRenderTargetColorMasksCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetRenderTargetScaleCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetRenderTargetsCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetSamplerCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetScissorCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetStencilTestCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetStorageBuffersCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetTextureCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetTransformFeedbackBuffersCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetUniformBuffersCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetUserClipDistanceCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetVertexAttribsCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetVertexBuffersCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SetViewportsCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
TextureBarrierCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
TextureBarrierTiledCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
TryHostConditionalRenderingCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
TryHostConditionalRenderingFlushCommand.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
UpdateRenderScaleCommand.cs Add support for render scale to vertex stage. (#2763) 2022-01-08 14:48:48 -03:00