Fernando Sahmkow
57a46c69f1
Fermi2D: limit blit area to only available area
Normaly OpenGL does not care if the areas exceed the texture regions but
other backends such as Vulkan do care about the limits of this areas.
This PR crops the areas of the blit in order that they don't surpass the
limits of the textures. This should help Vulkan and faulty OpenGL
drivers
6 years ago
Lioncash
cf9e13c255
video_core/surface: Add missing break in PixelFormatFromTextureFormat()
Prevents fallthrough into the following case.
6 years ago
Lioncash
6947bf8e44
vk_shader_decompiler: Resolve fallthrough within ExprDecompiler's ExprCondCode operator()
This would previously result in NeverExecute and UnusedIndex being
treated as regular predicates.
6 years ago
Lioncash
b42a74ff2c
gl_shader_decompiler: Resolve fallthrough within ExprDecompiler's ExprCondCode operator()
This would previously result in NeverExecute and UnusedIndex being
treated as regular predicates.
6 years ago
Lioncash
a24e8bf9cf
texture_cache: Avoid unnecessary surface copies within PickStrategy() and TryReconstructSurface()
We can take these by const reference and avoid making unnecessary
copies, preventing some atomic reference count increments and
decrements.
6 years ago
Lioncash
77b4916b33
control_flow: Silence truncation warnings
This can be trivially fixed by making the input size a size_t.
CFGRebuildState's constructor parameter is already a std::size_t, so
this just makes the size type fully conform with it.
6 years ago
Lioncash
4f16ce9294
gl_shader_decompiler: Make ExprDecompiler's GetResult() a const member function
This is only ever used to read, but not write, the resulting string, so
we can enforce this by making it a const member function.
6 years ago
Lioncash
67df3f7742
gl_shader_decompiler: Use a std::string_view with GetDeclarationWithSuffix()
This allows the function to be completely non-allocating for inputs of
all sizes (i.e. there's no heap cost for an input to convert to a
std::string_view).
6 years ago
Lioncash
04a1161354
gl_shader_decompiler: Fold flow_var constant into GetFlowVariable()
This is only ever used within this function, so we can narrow it's scope
down.
6 years ago
Lioncash
2f2ab9b5bc
gl_shader_decompiler: Mark ASTDecompiler/ExprDecompiler parameters as const references where applicable
These member functions don't actually modify the input parameter, so we
can make this explicit with the use of const.
6 years ago
Lioncash
b8a62adcf1
gl_shader_decompiler: Pass by reference to GenerateTextureArgument()
Avoids an unnecessary atomic reference count increment and decrement.
6 years ago
Lioncash
d1d7ce74d2
gl_shader_decompiler: Use std::holds_alternative within GenerateTexture()
This only ever queries if the type exists within the variant, but
doesn't actually do anything with the return value. We can just use
std::holds_alternative for this use case.
6 years ago
Lioncash
67658dd6e8
shader/node: std::move Meta instance within OperationNode constructor
Allows usages of the constructor to avoid an unnecessary copy.
6 years ago
Lioncash
9760795bfb
gl_shader_decompiler: Avoid unnecessary copies of MetaImage
MetaImage contains a std::vector, so copying here could result in
unnecessary reallocations. Given the operation lives throughout the
entire scope, this is safe to do.
6 years ago
Lioncash
c9c75f9587
maxwell_3d: Silence truncation warnings
A trivial warning caused by not using size_t as the argument types
instead of u32.
6 years ago
Lioncash
b25b94400e
video_core/gpu: Remove use of the global system accessor
We can just make use of the reference member variable instead of
accessing the global system instance.
6 years ago
Lioncash
524eb15513
video_core/texture_cache: Amend Doxygen references
Amends the doxygen comments so that they properly resolve. While we're
at it, we can correct some typos and fix up some of the comments'
formatting in order to make them slightly nicer to read.
6 years ago
Lioncash
ac4dbd3b25
common: Rename binary_find.h to algorithm.h
Makes the header more general for other potential algorithms in the
future. While we're at it, include a missing <functional> include to
satisfy the use of std::less.
6 years ago
Fernando Sahmkow
cfc2f30dc4
AsyncGpu: Address Feedback
6 years ago
Fernando Sahmkow
f32a49d3d8
Surfaces: Implement R4G4B4A4U format.
6 years ago
Fernando Sahmkow
b9ddb517b1
Surfaces: Implement ASTC 6x6 10x10 12x12 8x6 6x5
6 years ago
ReinUsesLisp
3d0f357307
shader/half_set_predicate: Fix HSETP2 for constant buffers
HSETP2 when used with a constant buffer parses the second operand type
as F32. This is not configurable.
6 years ago
ReinUsesLisp
632c9e4ee3
shader/half_set_predicate: Reduce DEBUG_ASSERT to LOG_DEBUG
6 years ago
ReinUsesLisp
58b597c5ec
gl_shader_disk_cache: Properly ignore existing cache
Previously old entries where appended to the file even if the shader
cache was ignored at boot. Address that issue.
6 years ago
Lioncash
f883cd4f0e
video_core/control_flow: Eliminate variable shadowing warnings
6 years ago
Lioncash
25702b6256
video_core/control_flow: Eliminate pessimizing moves
These can inhibit the ability of a compiler to perform RVO.
6 years ago
Lioncash
d82b181d44
video_core/ast: Unindent most of IsFullyDecompiled() by one level
6 years ago
Lioncash
6c41d1cd7e
video_core/ast: Make ShowCurrentState() take a string_view instead of std::string
Allows the function to be non-allocating in terms of the output string.
6 years ago
Lioncash
3c54edae24
video_core/ast: Eliminate variable shadowing warnings
6 years ago
Lioncash
5a0a9c7449
video_core/ast: Replace std::string with a constexpr std::string_view
Same behavior, but without the need to heap allocate
6 years ago
Lioncash
3a20d9734f
video_core/ast: Default the move constructor and assignment operator
This is behaviorally equivalent and also fixes a bug where some members
weren't being moved over.
6 years ago
Lioncash
43503a69bf
video_core/{ast, expr}: Organize forward declaration
Keeps them alphabetically sorted for readability.
6 years ago
Lioncash
50ad745585
video_core/expr: Supply operator!= along with operator==
Provides logical symmetry to the interface.
6 years ago
Lioncash
8eb1398f8d
video_core/{ast, expr}: Use std::move where applicable
Avoids unnecessary atomic reference count increments and decrements.
6 years ago
Lioncash
8e0c80f269
video_core/ast: Supply const accessors for data where applicable
Provides const equivalents of data accessors for use within const
contexts.
6 years ago
ReinUsesLisp
fe7f20e659
maxwell_3d: Add dirty flags for depth bounds values
This is useful in Vulkan where we want to update depth bounds without
caring if it's enabled or disabled through vkCmdSetDepthBounds.
6 years ago
Fernando Sahmkow
538f5880ff
GL_Renderer: Remove lefting snippet.
6 years ago
Fernando Sahmkow
9f2719d1a4
Gl_Rasterizer: Protect CPU Memory mapping from multiple threads.
6 years ago
Fernando Sahmkow
3f104464de
Core: Wait for GPU to be idle before shutting down.
6 years ago
Fernando Sahmkow
ffc2ce89a0
Nvdrv: Do framelimiting only in the CPU Thread
6 years ago
Fernando Sahmkow
5b5e60ffec
GPU_Async: Correct fences, display events and more.
This commit uses guest fences on vSync event instead of an articial fake
fence we had.
It also corrects to keep signaling display events while loading the game
as the OS is suppose to send buffers to vSync during that time.
6 years ago
Fernando Sahmkow
ab47a660c8
Texture_Cache: Blit Deduction corrections and simplifications.
6 years ago
Fernando Sahmkow
2036504a82
TextureCache: Add the ability to deduce if two textures are depth on blit.
6 years ago
Fernando Sahmkow
e6eae4b815
Shader_ir: Address feedback
6 years ago
Fernando Sahmkow
3c09d9abe6
Shader_Ir: Address Feedback and clang format.
6 years ago
Fernando Sahmkow
507a9c6a40
vk_shader_decompiler: Correct Branches inside conditionals.
6 years ago
Fernando Sahmkow
000ad558dd
vk_shader_decompiler: Clean code and be const correct.
6 years ago
Fernando Sahmkow
7c756baa77
Shader_IR: clean up AST handling and add documentation.
6 years ago
Fernando Sahmkow
5ea740beb5
Shader_IR: Correct OutwardMoves for Ifs
6 years ago
Fernando Sahmkow
100a4bd988
vk_shader_compiler: Don't enclose branches with if(true) to avoid crashing AMD
6 years ago