aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader
AgeCommit message (Collapse)Author
2020-09-17decode/image: Eliminate switch fallthrough in DecodeImage()Lioncash
Fortunately this didn't result in any issues, given the block that code was falling through to would immediately break.
2020-09-17decoder/texture: Eliminate narrowing conversion in GetTldCode()Lioncash
The assignment was previously truncating a u64 value to a bool.
2020-09-16video_core: Enforce -Werror=switchReinUsesLisp
This forces us to fix all -Wswitch warnings in video_core.
2020-09-06video_core: Remove all Core::System references in rendererReinUsesLisp
Now that the GPU is initialized when video backends are initialized, it's no longer needed to query components once the game is running: it can be done when yuzu is booting. This allows us to pass components between constructors and in the process remove all Core::System references in the video backend.
2020-09-03Merge pull request #4575 from lioncash/asyncbunnei
async_shaders: Mark getters as const member functions
2020-08-27Merge pull request #4524 from lioncash/memory-logbunnei
shader/memory: Amend UNIMPLEMENTED_IF_MSG without a message
2020-08-24async_shaders: Mark getters as const member functionsLioncash
While we're at it, we can also mark them as nodiscard.
2020-08-17Merge pull request #4443 from ameerj/vk-async-shadersDavid
vulkan_renderer: Async shader/graphics pipeline compilation
2020-08-16Remove unneeded newlines, optional Registry in shader paramsameerj
Addressing feedback from Rodrigo
2020-08-16Morph: Update worker allocation commentAmeer J
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2020-08-16move thread 1/4 count computation into allocate workers methodameerj
2020-08-16Address feedback, add shader compile notifier, update setting textameerj
2020-08-16Vk Async Worker directly emplace in cacheameerj
2020-08-16Address feedback. Bruteforce delete duplicatesameerj
2020-08-16Vk Async pipeline compilationameerj
2020-08-14shader/memory: Amend UNIMPLEMENTED_IF_MSG without a messageLioncash
We need to provide a message for this variant of the macro, so we can simply log out the type being used.
2020-08-14async_shaders: Resolve -Wpessimizing-move warningLioncash
Prevents pessimization of the move constructor (which thankfully didn't actually happen in practice here, given std::thread isn't copyable).
2020-08-13General: Tidy up clang-format warnings part 2Lioncash
2020-07-24Merge pull request #4391 from lioncash/nrvobunnei
video_core: Allow copy elision to take place where applicable
2020-07-21Merge pull request #4361 from ReinUsesLisp/lane-idRodrigo Locatti
decode/other: Implement S2R.LaneId
2020-07-21video_core: Allow copy elision to take place where applicableLioncash
Removes const from some variables that are returned from functions, as this allows the move assignment/constructors to execute for them.
2020-07-21Merge pull request #4324 from ReinUsesLisp/formatsbunnei
video_core: Fix, add and rename pixel formats
2020-07-18Fix style issuesDavid Marcec
2020-07-17Remove duplicate configDavid Marcec
2020-07-17Use conditional varDavid Marcec
2020-07-17async shadersDavid Marcec
2020-07-16decode/other: Implement S2R.LaneIdReinUsesLisp
This maps to host's thread id. - Fixes graphical issues on Paper Mario.
2020-07-13video_core: Rearrange pixel format namesReinUsesLisp
Normalizes pixel format names to match Vulkan names. Previous to this commit pixel formats had no convention, leading to confusion and potential bugs.
2020-06-26Merge pull request #4147 from ReinUsesLisp/hset2-immbunnei
shader/half_set: Implement HSET2_IMM
2020-06-24Merge pull request #4083 from Morph1984/B10G11R11Fbunnei
decode/image: Implement B10G11R11F
2020-06-22shader/half_set: Implement HSET2_IMMReinUsesLisp
Add HSET2_IMM. Due to the complexity of the encoding avoid using BitField unions and read the relevant bits from the code itself. This is less error prone.
2020-06-20decode/image: Implement B10G11R11FMorph
- Used by Kirby Star Allies
2020-06-18memory_util: boost hashes are size_tMerryMage
* boost::hash_value returns a size_t * boost::hash_combine takes a size_t& argument
2020-06-05shader/texture: Join separate image and sampler pairs offlineReinUsesLisp
Games using D3D idioms can join images and samplers when a shader executes, instead of baking them into a combined sampler image. This is also possible on Vulkan. One approach to this solution would be to use separate samplers on Vulkan and leave this unimplemented on OpenGL, but we can't do this because there's no consistent way of determining which constant buffer holds a sampler and which one an image. We could in theory find the first bit and if it's in the TIC area, it's an image; but this falls apart when an image or sampler handle use an index of zero. The used approach is to track for a LOP.OR operation (this is done at an IR level, not at an ISA level), track again the constant buffers used as source and store this pair. Then, outside of shader execution, join the sample and image pair with a bitwise or operation. This approach won't work on games that truly use separate samplers in a meaningful way. For example, pooling textures in a 2D array and determining at runtime what sampler to use. This invalidates OpenGL's disk shader cache :) - Used mostly by D3D ports to Switch
2020-06-04shader/track: Move bindless tracking to a separate functionReinUsesLisp
2020-06-02Merge pull request #4016 from ReinUsesLisp/invocation-infoLC
shader/other: Fix hardcoded value in S2R INVOCATION_INFO
2020-05-30shader/other: Fix hardcoded value in S2R INVOCATION_INFOReinUsesLisp
Geometry shaders built from Nvidia's compiler check for bits[16:23] to be less than or equal to 0 with VSETP to default to a "safe" value of 0x8000'0000 (safe from hardware's perspective). To avoid hitting this path in the shader, return 0x00ff'0000 from S2R INVOCATION_INFO. This seems to be the maximum number of vertices a geometry shader can emit in a primitive.
2020-05-27shader/other: Implement MEMBAR.CTSReinUsesLisp
This silences an assertion we were hitting and uses workgroup memory barriers when the game requests it.
2020-05-26Merge pull request #3981 from ReinUsesLisp/barbunnei
shader/other: Implement BAR.SYNC 0x0
2020-05-26Merge pull request #3980 from ReinUsesLisp/red-opbunnei
shader/memory: Implement non-addition operations in RED
2020-05-21shader/other: Implement BAR.SYNC 0x0ReinUsesLisp
Trivially implement this particular case of BAR. Unless games use OpenCL or CUDA barriers, we shouldn't hit any other case here.
2020-05-21shader/memory: Implement non-addition operations in REDReinUsesLisp
Trivially implement these instructions. They are used in Astral Chain.
2020-05-21shader/other: Implement thread comparisons (NV_shader_thread_group)ReinUsesLisp
Hardware S2R special registers match gl_Thread*MaskNV. We can trivially implement these using Nvidia's extension on OpenGL or naively stubbing them with the ARB instructions to match. This might cause issues if the host device warp size doesn't match Nvidia's. That said, this is unlikely on proper shaders. Refer to the attached url for more documentation about these flags. https://www.khronos.org/registry/OpenGL/extensions/NV/NV_shader_thread_group.txt
2020-05-09shader_ir: Separate float-point comparisons in ordered and unorderedReinUsesLisp
This allows us to use native SPIR-V instructions without having to manually check for NAN.
2020-05-02Merge pull request #3693 from ReinUsesLisp/clean-samplersbunnei
shader/texture: Support multiple unknown sampler properties
2020-04-30Merge pull request #3799 from ReinUsesLisp/iadd-ccbunnei
shader: Implement P2R CC, IADD Rd.CC and IADD.X
2020-04-30Merge pull request #3788 from FernandoS27/revertbunnei
Revert: shader_decode: Fix LD, LDG when track constant buffer.
2020-04-28shader/arithmetic_integer: Fix tracking issue in temporaryReinUsesLisp
This temporary is not needed as we mark Rd.CC + IADD.X as unimplemented. It caused issues when tracking global buffers.
2020-04-28Merge pull request #3784 from ReinUsesLisp/shader-memory-utilbunnei
shader/memory_util: Deduplicate code
2020-04-26shader/memory_util: Deduplicate codeReinUsesLisp
Deduplicate code shared between vk_pipeline_cache and gl_shader_cache as well as shader decoder code. While we are at it, fix a bug in gl_shader_cache where compute shaders had an start offset of a stage shader.