aboutsummaryrefslogtreecommitdiff
path: root/src/video_core
AgeCommit message (Collapse)Author
2019-05-30gl_rasterizer: Use GL_QUADS to emulate quads renderingReinUsesLisp
2019-05-29Merge pull request #2446 from ReinUsesLisp/tidbunnei
shader: Implement S2R Tid{XYZ} and CtaId{XYZ}
2019-05-27gl_device: Add commentary to AOFFI unit test source codeReinUsesLisp
The intention behind this commit is to hint someone inspecting an apitrace dump to ignore this ill-formed GLSL code.
2019-05-27gl_shader_gen: Always declare extensions after the version declarationReinUsesLisp
This addresses a bug on geometry shaders where code was being written before all #extension declarations were done. Ref to #2523
2019-05-26vk_device: Let formats array type be deducedReinUsesLisp
2019-05-26vk_shader_decompiler: Misc fixesReinUsesLisp
Fix missing OpSelectionMerge instruction. This caused devices loses on most hardware, Intel didn't care. Fix [-1;1] -> [0;1] depth conversions. Conditionally use VK_EXT_scalar_block_layout. This allows us to use non-std140 layouts on UBOs. Update external Vulkan headers.
2019-05-26vk_device: Enable features when available and misc changesReinUsesLisp
Keeps track of native ASTC support, VK_EXT_scalar_block_layout availability and SSBO range. Check for independentBlend and vertexPipelineStorageAndAtomics as a required feature. Always enable it. Use vk::to_string format to log Vulkan enums. Style changes.
2019-05-24renderer_opengl/utils: Use a std::string_view with LabelGLObject()Lioncash
Uses a std::string_view instead of a std::string, given the pointed to string isn't modified and is only used in a formatting operation. This is nice because a few usages directly supply a string literal to the function, allowing these usages to otherwise not heap allocate, unlike the std::string overloads. While we're at it, we can combine the address formatting into a single formatting call.
2019-05-24Merge pull request #2358 from ReinUsesLisp/parallel-shaderbunnei
gl_shader_cache: Use shared contexts to build shaders in parallel at boot
2019-05-24Merge pull request #2485 from ReinUsesLisp/generic-memorybunnei
shader/memory: Implement generic memory stores and loads (ST and LD)
2019-05-24gl_shader_decompiler: Use an if based cbuf indexing for broken driversReinUsesLisp
The following code is broken on AMD's proprietary GLSL compiler: ```glsl uint idx = ...; vec4 values = ...; float some_value = values[idx & 3]; ``` It index the wrong components, to fix this the following pessimized code is emitted when that bug is present: ```glsl uint idx = ...; vec4 values = ...; float some_value; if ((idx & 3) == 0) some_value = values.x; if ((idx & 3) == 1) some_value = values.y; if ((idx & 3) == 2) some_value = values.z; if ((idx & 3) == 3) some_value = values.w; ```
2019-05-24gl_device: Add test to detect broken component indexingReinUsesLisp
Component indexing on AMD's proprietary driver is broken. This commit adds a test to detect when we are on a driver that can't successfully manage component indexing. It dispatches a dummy draw with just one vertex shader that writes to an indexed SSBO from the GPU with data sent through uniforms, it then reads that data from the CPU and compares the expected output.
2019-05-23shader/shader_ir: Make Comment() take a std::string by valueLioncash
This allows for forming comment nodes without making unnecessary copies of the std::string instance. e.g. previously: Comment(fmt::format("Base address is c[0x{:x}][0x{:x}]", cbuf->GetIndex(), cbuf_offset)); Would result in a copy of the string being created, as CommentNode() takes a std::string by value (a const ref passed to a value parameter results in a copy). Now, only one instance of the string is ever moved around. (fmt::format returns a std::string, and since it's returned from a function by value, this is a prvalue (which can be treated like an rvalue), so it's moved into Comment's string parameter), we then move it into the CommentNode constructor, which then moves the string into its member variable).
2019-05-23shader/decode/*: Add missing newline to files lacking themLioncash
Keeps the shader code file endings consistent.
2019-05-23shader/decode/*: Eliminate indirect inclusionsLioncash
Amends cases where we were using things that were indirectly being satisfied through other headers. This way, if those headers change and eliminate dependencies on other headers in the future, we don't have cascading compilation errors.
2019-05-22shader/decode/memory: Remove left in debug pragmaLioncash
2019-05-21renderer_opengl/gl_shader_decompiler: Remove redundant name specification in ↵Lioncash
format string This accidentally slipped through a rebase.
2019-05-20gl_shader_cache: Fix clang strict standard build issuesReinUsesLisp
2019-05-20gl_shader_cache: Use shared contexts to build shaders in parallelReinUsesLisp
2019-05-20shader/memory: Implement ST (generic memory)ReinUsesLisp
2019-05-20shader/memory: Implement LD (generic memory)ReinUsesLisp
2019-05-20Merge pull request #2494 from lioncash/shader-textbunnei
gl_shader_decompiler: Add AddLine() overloads with single function that forwards to libfmt
2019-05-20shader: Implement S2R Tid{XYZ} and CtaId{XYZ}ReinUsesLisp
2019-05-20gl_shader_decompiler: Make GetSwizzle constexprReinUsesLisp
2019-05-20gl_shader_decompiler: Tidy up minor remaining cases of unnecessary ↵Lioncash
std::string concatenation
2019-05-20gl_shader_decompiler: Replace individual overloads with the fmt-based oneLioncash
Gets rid of the need to special-case brace handling depending on the overload used, and makes it consistent across the board with how fmt handles them. Strings with compile-time deducible strings are directly forwarded to std::string's constructor, so we don't need to worry about the performance difference here, as it'll be identical.
2019-05-20gl_shader_decompiler: Utilize fmt overload of AddLine() where applicableLioncash
2019-05-19Revert #2466Fernando Sahmkow
This reverts a tested behavior on delay slots not exiting if the exit flag is set. Currently new tests are required in order to ensure this behavior.
2019-05-19gl_shader_decompiler: Add AddLine() overload that forwards to fmtLioncash
In a lot of places throughout the decompiler, string concatenation via operator+ is used quite heavily. This is usually fine, when not heavily used, but when used extensively, can be a problem. operator+ creates an entirely new heap allocated temporary string and given we perform expressions like: std::string thing = a + b + c + d; this ends up with a lot of unnecessary temporary strings being created and discarded, which kind of thrashes the heap more than we need to. Given we utilize fmt in some AddLine calls, we can make this a part of the ShaderWriter's API. We can make an overload that simply acts as a passthrough to fmt. This way, whenever things need to be appended to a string, the operation can be done via a single string formatting operation instead of discarding numerous temporary strings. This also has the benefit of making the strings themselves look nicer and makes it easier to spot errors in them.
2019-05-19Merge pull request #2441 from ReinUsesLisp/al2pbunnei
shader: Implement AL2P and ALD.PHYS
2019-05-19Merge pull request #2491 from FernandoS27/dma-fixHexagon12
Dma_pusher: ASSERT on empty command_list
2019-05-19Merge pull request #2452 from FernandoS27/raster-cache-fixHexagon12
Correct possible error on Rasterizer Caches
2019-05-19Merge pull request #2497 from lioncash/shader-irHexagon12
shader/shader_ir: Minor changes
2019-05-19Merge pull request #2495 from lioncash/cacheHexagon12
gl_shader_disk_cache: Minor cleanup
2019-05-19Dma_pusher: ASSERT on empty command_listFernando Sahmkow
This is a measure to avoid crashes on command list reading as an empty command_list is considered a NOP.
2019-05-19Merge pull request #2467 from lioncash/moveHexagon12
video_core/gpu_thread: Remove redundant copy constructor for CommandDataContainer
2019-05-19Merge pull request #2466 from yuzu-emu/mme-exit-delay-slotHexagon12
GPU/MMEInterpreter: Ignore the 'exit' flag when it's executed inside a delay slot.
2019-05-19Merge pull request #2468 from lioncash/deductionHexagon12
yuzu: Remove explicit types from locks where applicable
2019-05-19Merge pull request #2472 from FernandoS27/ticHexagon12
maxwell_3d: reduce severity of different component formats assert.
2019-05-19Merge pull request #2469 from lioncash/copyableHexagon12
video_core/engines/maxwell_3d: Add is_trivially_copyable_v check for Regs
2019-05-19Merge pull request #2470 from lioncash/ranged-forSebastian Valle
video_core/engines/maxwell_3d: Simplify for loops into ranged for loops within InitializeRegisterDefaults()
2019-05-19Merge pull request #2480 from ReinUsesLisp/fix-quadsHexagon12
gl_rasterizer: Pass the right number of array quad vertices count
2019-05-19Merge pull request #2483 from ReinUsesLisp/fix-point-sizeHexagon12
gl_rasterizer: Limit OpenGL point size to a minimum of 1
2019-05-19Merge pull request #2471 from lioncash/engine-uploadSebastian Valle
video_core/engines/engine_upload: Minor tidying
2019-05-19Merge pull request #2484 from ReinUsesLisp/triangle-fanSebastian Valle
maxwell_to_gl: Add TriangleFan primitive topology
2019-05-19shader/shader_ir: Remove unnecessary inline specifiersLioncash
constexpr internally links by default, so the inline specifier is unnecessary.
2019-05-19shader/shader_ir: Simplify constructors for OperationNodeLioncash
Many of these constructors don't even need to be templated. The only ones that need to be templated are the ones that actually make use of the parameter pack. Even then, since std::vector accepts an initializer list, we can supply the parameter pack directly to it instead of creating our own copy of the list, then copying it again into the std::vector.
2019-05-19shader/shader_ir: Remove unnecessary template parameter packs from ↵Lioncash
Operation() overloads where applicable These overloads don't actually make use of the parameter pack, so they can be turned into regular non-template function overloads.
2019-05-19shader/shader_ir: Mark tracking functions as const member functionsLioncash
These don't actually modify instance state, so they can be marked as const member functions
2019-05-19shader/shader_ir: Place implementations of constructor and destructor in cpp ↵Lioncash
file Given the class contains quite a lot of non-trivial types, place the constructor and destructor within the cpp file to avoid inlining construction and destruction code everywhere the class is used.