| Age | Commit message (Collapse) | Author |
|
|
|
shader: Implement S2R Tid{XYZ} and CtaId{XYZ}
|
|
The intention behind this commit is to hint someone inspecting an
apitrace dump to ignore this ill-formed GLSL code.
|
|
This addresses a bug on geometry shaders where code was being written
before all #extension declarations were done. Ref to #2523
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
gl_shader_cache: Use shared contexts to build shaders in parallel at boot
|
|
shader/memory: Implement generic memory stores and loads (ST and LD)
|
|
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;
```
|
|
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.
|
|
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).
|
|
Keeps the shader code file endings consistent.
|
|
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.
|
|
|
|
format string
This accidentally slipped through a rebase.
|
|
|
|
|
|
|
|
|
|
gl_shader_decompiler: Add AddLine() overloads with single function that forwards to libfmt
|
|
|
|
|
|
std::string concatenation
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
shader: Implement AL2P and ALD.PHYS
|
|
Dma_pusher: ASSERT on empty command_list
|
|
Correct possible error on Rasterizer Caches
|
|
shader/shader_ir: Minor changes
|
|
gl_shader_disk_cache: Minor cleanup
|
|
This is a measure to avoid crashes on command list reading as an empty
command_list is considered a NOP.
|
|
video_core/gpu_thread: Remove redundant copy constructor for CommandDataContainer
|
|
GPU/MMEInterpreter: Ignore the 'exit' flag when it's executed inside a delay slot.
|
|
yuzu: Remove explicit types from locks where applicable
|
|
maxwell_3d: reduce severity of different component formats assert.
|
|
video_core/engines/maxwell_3d: Add is_trivially_copyable_v check for Regs
|
|
video_core/engines/maxwell_3d: Simplify for loops into ranged for loops within InitializeRegisterDefaults()
|
|
gl_rasterizer: Pass the right number of array quad vertices count
|
|
gl_rasterizer: Limit OpenGL point size to a minimum of 1
|
|
video_core/engines/engine_upload: Minor tidying
|
|
maxwell_to_gl: Add TriangleFan primitive topology
|
|
constexpr internally links by default, so the inline specifier is
unnecessary.
|
|
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.
|
|
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.
|
|
These don't actually modify instance state, so they can be marked as
const member functions
|
|
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.
|