Rodrigo Locatti
406d298457
Merge pull request #4110 from ReinUsesLisp/direct-upload-sets
...
vk_update_descriptor: Upload descriptor sets data directly
2020-06-22 05:02:13 -03:00
ReinUsesLisp
2f09c7ddd3
renderer_vulkan: Update validation layer name and test before enabling
...
Update validation layer string to VK_LAYER_KHRONOS_validation.
While we are at it, properly check for available validation layers
before enabling them.
2020-06-22 04:10:45 -03:00
bunnei
14a1181a97
Merge pull request #4122 from lioncash/hide
...
video_core: Eliminate some variable shadowing
2020-06-21 22:38:04 -04:00
bunnei
c27c76ed43
Merge pull request #4126 from lioncash/noexcept
...
vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()
2020-06-21 22:36:14 -04:00
Morph
f77c897b8d
gl_shader_decompiler: Enable GL_EXT_texture_shadow_lod if available
...
Enable GL_EXT_texture_shadow_lod if available. If this extension is not available, such as on Intel/AMD proprietary drivers, use textureGrad as a workaround.
2020-06-20 23:02:29 -04:00
Morph
1e65da971b
gl_device: Check for GL_EXT_texture_shadow_lod
2020-06-20 22:14:32 -04:00
bunnei
f98bf1025f
Merge pull request #4120 from lioncash/arb
...
gl_arb_decompiler: Avoid several string copies
2020-06-20 22:11:49 -04:00
MerryMage
c12eb814b4
macro_jit_x64: Use ecx for shift register
...
shl/shr only accept cl as their second argument
2020-06-20 22:24:05 +01:00
Lioncash
ef53b2fd08
texture_cache: Fix incorrect address used in a DeduceSurface() call
...
Previously the source was being deduced twice in a row.
2020-06-20 14:11:28 -04:00
merry
928e9c09aa
Merge pull request #4125 from lioncash/macro-shift
...
macro_jit_x64: Amend readability of Compile_ExtractShiftLeftRegister()
2020-06-20 16:08:23 +01:00
merry
2bd903e021
Merge pull request #4123 from lioncash/unused-var
...
macro_jit_x64: Remove unused variable
2020-06-20 16:07:58 +01:00
Morph
480e1fa987
decode/image: Implement B10G11R11F
...
- Used by Kirby Star Allies
2020-06-20 00:28:30 -04:00
bunnei
7d1dca4c98
Merge pull request #4099 from MerryMage/macOS-build
...
Fix compilation on macOS
2020-06-19 23:31:04 -04:00
Lioncash
5865a10885
gl_arb_decompiler: Avoid several string copies
...
Variables that are marked as const cannot have the move constructor
invoked when returning from a function (the move constructor requires a
non-const variable so it can "steal" the resources from it.
2020-06-19 23:09:16 -04:00
Lioncash
a6e5b84d1f
vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()
...
Check() can throw an exception if the Vulkan result isn't successful.
We remove the check so that std::terminate isn't outright called and
allows for better debugging (should it ever actually fail).
2020-06-19 23:01:59 -04:00
Lioncash
5a4e89b901
macro_jit_x64: Correct readability of Compile_ExtractShiftLeftImmediate()
...
Previously dst wasn't being used.
2020-06-19 22:57:23 -04:00
Lioncash
140f953b6a
macro_jit_x64: Correct readability of Compile_ExtractShiftLeftRegister()
...
Previously dst wasn't being used.
2020-06-19 22:56:55 -04:00
Lioncash
8ea749c1ca
macro_jit_x64: Remove unused variable
...
Removes a completely unused label and marks another variable as unused,
given it seems like it has potential uses in the future.
2020-06-19 22:10:45 -04:00
Lioncash
479605b3e5
memory_manager: Eliminate variable shadowing
...
Renames some variables to prevent ones in inner scopes from shadowing
outer-scoped variables.
The Copy* functions have no shadowing, but we rename them anyways to
remain consistent with the other functions.
2020-06-19 22:02:58 -04:00
Lioncash
811bff009e
macro_jit_x64: Eliminate variable shadowing in Compile_ProcessResult()
...
We can reduce the capture scope so that it's not possible for both "reg"
variables to clash with one another.
While we're at it, we can prevent unnecessary copies while we're at it.
2020-06-19 21:57:44 -04:00
Lioncash
4514b80b3e
buffer_cache: Eliminate local variable shadowing
...
We can just make use of the instance in the scope above this one.
2020-06-19 21:55:02 -04:00
bunnei
7daea551c0
Merge pull request #4087 from MerryMage/macrojit-inline-Read
...
macro_jit_x64: Inline Engines::Maxwell3D::GetRegisterValue
2020-06-19 21:32:07 -04:00
MerryMage
977ceb4056
macro_jit_x64: Remove unused function Read
2020-06-19 11:39:41 +01:00
bunnei
5a092fb61e
Merge pull request #4090 from MerryMage/macrojit-bugs
...
macro_jit_x64: Optimization correctness
2020-06-18 22:28:17 -04:00
ReinUsesLisp
cf137ea40b
vk_rasterizer: Don't preserve contents on full screen clears
...
There's no need to load contents from the CPU when a clear resets all
the contents of the underlying memory. This is already implemented on
OpenGL and the texture cache.
2020-06-18 18:18:33 -03:00
ReinUsesLisp
7d763f060e
vk_update_descriptor: Upload descriptor sets data directly
...
Instead of copying to a temporary payload before sending the update task
to the worker thread, insert elements to the payload directly.
2020-06-18 17:47:19 -03:00
MerryMage
69f38355ed
vk_rasterizer: BindTransformFeedbackBuffersEXT accepts a size of type VkDeviceSize
2020-06-18 15:47:44 +01:00
MerryMage
b1eada6079
renderer_vulkan: Fix macOS GetBundleDirectory reference
2020-06-18 15:47:44 +01:00
MerryMage
442e48ef4c
memory_util: boost hashes are size_t
...
* boost::hash_value returns a size_t
* boost::hash_combine takes a size_t& argument
2020-06-18 15:47:43 +01:00
MerryMage
8ae7154541
Rename PAGE_SHIFT to PAGE_BITS
...
macOS header files #define PAGE_SHIFT
2020-06-18 15:47:43 +01:00
Morph
2f420618ea
vk_sampler_cache: Emulate GL_LINEAR/NEAREST minification filters
...
Emulate GL_LINEAR/NEAREST minification filters using minLod = 0 and maxLod = 0.25 during sampler creation
2020-06-18 04:56:31 -04:00
Morph
be660e7749
maxwell_to_vk: Reorder filter cases and correct mipmap_filter=None
...
maxwell_to_vk: Reorder filtering modes to start with None, then Nearest, then Linear.
maxwell_to_vk: Logs filter modes under UNREACHABLE_MSG instead of UNIMPLEMENTED_MSG, since any unknown filter modes are invalid and not unimplemented.
maxwell_to_vk: Return VK_SAMPLER_MIPMAP_MODE_NEAREST instead of VK_SAMPLER_MIPMAP_MODE_LINEAR when mipmap_filter is None with the description from the VkSamplerCreateInfo(3) man page.
2020-06-18 04:56:31 -04:00
Morph
8868fb745f
maxwell_to_gl: Miscellaneous changes
...
maxwell_to_gl: Log unimplemented features under UNIMPLEMENTED_MSG instead of LOG_ERROR to bring into parity with maxwell_to_vk
maxwell_to_gl: Deduplicate logging in VertexType(), merging them into one.
maxwell_to_gl: Return GL_NEAREST instead of GL_LINEAR if an unknown texture filter mode is encountered.
maxwell_to_gl: Log the mipmap filter mode if an unknown value is passed in.
maxwell_to_gl: Reorder filtering modes to start with None, then Nearest, then Linear.
2020-06-18 04:56:31 -04:00
Rodrigo Locatti
edb2114bac
Merge pull request #4092 from Morph1984/image-bindings
...
gl_device: Reserve 4 image bindings for fragment stage
2020-06-18 04:59:48 -03:00
MerryMage
44f10d9b9f
macro_jit_x64: Inline Engines::Maxwell3D::GetRegisterValue
2020-06-17 17:17:08 +01:00
bunnei
a8ac99b619
Merge pull request #4086 from MerryMage/abi
...
xbyak_abi: Cleanup
2020-06-17 11:20:52 -04:00
MerryMage
c409722435
macro_jit_x64: Optimization implicitly assumes same destination
2020-06-17 10:36:36 +01:00
MerryMage
a6ddd7c382
macro_jit_x64: Should not skip zero registers for certain ALU ops
...
The code generated for these ALU ops assume src_a and src_b are always valid.
2020-06-17 10:36:34 +01:00
bunnei
b660ef6c8a
Merge pull request #4089 from MerryMage/macrojit-cleanup-1
...
macro_jit_x64: Cleanup
2020-06-16 23:44:48 -04:00
bunnei
798ec003ce
Merge pull request #4041 from ReinUsesLisp/arb-decomp
...
gl_arb_decompiler: Implement an assembly shader decompiler
2020-06-16 14:56:23 -04:00
Morph
e2f5d16540
gl_device: Reserve at least 4 image bindings for fragment stage
...
Due to the limitation of GL_MAX_IMAGE_UNITS being low (8) on Intel's and Nvidia's proprietary drivers, we have to reserve an appropriate amount of image bindings for each of the stages. So far games have been observed to use 4 image bindings on the fragment stage (Kirby Star Allies) and 1 on the vertex stage (TWD series).
No games thus far in my limited testing used more than 4 images concurrently and across all currently active programs.
This fixes shader compilation errors on Kirby Star Allies on OpenGL (GLSL/GLASM)
2020-06-16 03:03:07 -04:00
Rodrigo Locatti
0bd9bc7201
Merge pull request #4066 from ReinUsesLisp/shared-ptr-buf
...
buffer_cache: Avoid passing references of shared pointers and misc style changes
2020-06-15 22:29:32 -03:00
MerryMage
cf0aad7d6a
macro_jit_x64: Remove NEXT_PARAMETER
...
Not required, as PARAMETERS can just be incremented directly.
2020-06-15 21:19:38 +01:00
MerryMage
1799f4e774
macro_jit_x64: Remove unused function Compile_WriteCarry
2020-06-15 21:19:38 +01:00
MerryMage
c09a9e5cc7
macro_jit_x64: Select better registers
...
All registers are now callee-save registers.
RBX and RBP selected for STATE and RESULT because these are most commonly accessed; this is to avoid the REX prefix.
RBP not used for STATE because there are some SIB restrictions, RBX emits smaller code.
2020-06-15 21:19:38 +01:00
MerryMage
79aa7b3ace
macro_jit_x64: Remove REGISTERS
...
Unnecessary since this is just an offset from STATE.
2020-06-15 21:00:59 +01:00
MerryMage
35db6e1c68
macro_jit_x64: Remove JITState::parameters
...
This can be passed in as an argument instead.
2020-06-15 20:55:02 +01:00
MerryMage
389549b80d
macro_jit_x64: Remove METHOD_ADDRESS_64
...
Unnecessary variable.
2020-06-15 20:51:33 +01:00
MerryMage
a6a43a5ae0
macro_jit_x64: Remove RESULT_64
...
This Reg64 codepath has the exact same behaviour as the Reg32 one.
2020-06-15 20:35:08 +01:00
MerryMage
d563017dfe
xbyak_abi: Remove *GPS variants of stack manipulation functions
2020-06-15 18:59:54 +01:00
ReinUsesLisp
6e5d8aac4d
video_core/macro_jit_x64: Remove initializer in member variable
...
Fix build time issues on gcc. Confirmed through asan that avoiding this
initialization is safe.
2020-06-15 05:17:55 -03:00
bunnei
92021a344c
Merge pull request #4064 from ReinUsesLisp/invalidate-buffers
...
gl_rasterizer: Mark vertex buffers as dirty after buffer cache invalidation
2020-06-14 00:29:16 -04:00
bunnei
c2ea1e1bcb
Merge pull request #4049 from ReinUsesLisp/separate-samplers
...
shader/texture: Join separate image and sampler pairs offline
2020-06-13 13:48:27 -04:00
bunnei
5633887569
Merge pull request #3986 from ReinUsesLisp/shader-cache
...
shader_cache: Implement a generic runtime shader cache
2020-06-12 23:14:48 -04:00
ReinUsesLisp
87011a97f9
gl_arb_decompiler: Implement FSwizzleAdd
2020-06-11 22:12:07 -03:00
ReinUsesLisp
a63a0daa5e
gl_arb_decompiler: Implement an assembly shader decompiler
...
Emit code compatible with NV_gpu_program5.
This should emit code compatible with Fermi, but it wasn't tested on
that architecture. Pascal has some issues not present on Turing GPUs.
2020-06-11 22:12:07 -03:00
bunnei
83e3b77ed7
Merge pull request #4027 from ReinUsesLisp/3d-slices
...
texture_cache: Implement rendering to 3D textures
2020-06-09 21:52:15 -04:00
ReinUsesLisp
6508cdd003
buffer_cache: Avoid passing references of shared pointers and misc style changes
...
Instead of using as template argument a shared pointer, use the
underlying type and manage shared pointers explicitly. This can make
removing shared pointers from the cache more easy.
While we are at it, make some misc style changes and general
improvements (like insert_or_assign instead of operator[] + operator=).
2020-06-09 18:30:49 -03:00
ReinUsesLisp
7646f2c21d
gl_rasterizer: Mark vertex buffers as dirty after buffer cache invalidation
...
Vertex buffers bindings become invalid after the stream buffer is
invalidated. We were originally doing this, but it got lost at some
point.
- Fixes Animal Crossing: New Horizons, but it affects everything.
2020-06-08 20:24:16 -03:00
ReinUsesLisp
6e122f0b2c
buffer_cache: Return stream buffer invalidation in Map instead of Unmap
...
We have to invalidate whatever cache is being used before uploading the
data, hence it makes more sense to return this on Map instead of Unmap.
2020-06-08 20:22:31 -03:00
bunnei
3626254f48
Merge pull request #4040 from ReinUsesLisp/nv-transform-feedback
...
gl_rasterizer: Use NV_transform_feedback for XFB on assembly shaders
2020-06-08 16:18:33 -04:00
bunnei
98d2461529
Merge pull request #4052 from ReinUsesLisp/debug-output
...
renderer_opengl: Only enable DEBUG_OUTPUT when graphics debugging is enabled
2020-06-08 10:16:41 -04:00
ReinUsesLisp
bd43c05470
texture_cache: Port original code management for 2D vs 3D textures
...
Handle blits to images as 2D, even when they have block depth.
- Fixes rendering issues on Luigi's Mansion 3
2020-06-08 05:02:22 -03:00
ReinUsesLisp
c99f5d405b
texture_cache: Simplify blit code
2020-06-08 05:01:44 -03:00
ReinUsesLisp
3c2ae53b4c
texture_cache: Handle 3D texture blits with one layer
2020-06-08 05:01:00 -03:00
ReinUsesLisp
c95c254f3e
texture_cache: Implement rendering to 3D textures
...
This allows rendering to 3D textures with more than one slice.
Applications are allowed to render to more than one slice of a texture
using gl_Layer from a VTG shader.
This also requires reworking how 3D texture collisions are handled, for
now, this commit allows rendering to slices but not to miplevels. When a
render target attempts to write to a mipmap, we fallback to the previous
implementation (copying or flushing as needed).
- Fixes color correction 3D textures on UE4 games (rainbow effects).
- Allows Xenoblade games to render to 3D textures directly.
2020-06-08 05:01:00 -03:00
Rodrigo Locatti
2293e8a11a
Merge pull request #4034 from ReinUsesLisp/storage-texels
...
vk_rasterizer: Implement storage texels and atomic image operations
2020-06-07 18:43:24 -03:00
ReinUsesLisp
abcea1bb18
rasterizer_cache: Remove files and includes
...
The rasterizer cache is no longer used. Each cache has its own generic
implementation optimized for the cached data.
2020-06-07 04:32:57 -03:00
ReinUsesLisp
678f95e4f8
vk_pipeline_cache: Use generic shader cache
...
Trivial port the generic shader cache to Vulkan.
2020-06-07 04:32:57 -03:00
ReinUsesLisp
b96f65b62b
gl_shader_cache: Use generic shader cache
...
Trivially port the generic shader cache to OpenGL.
2020-06-07 04:32:57 -03:00
ReinUsesLisp
dc27252352
shader_cache: Implement a generic shader cache
...
Implement a generic shader cache for fast lookups and invalidations.
Invalidations are cheap but expensive when a shader is invalidated.
Use two mutexes instead of one to avoid locking invalidations for
lookups and vice versa. When a shader has to be removed, lookups are
locked as expected.
2020-06-07 04:32:32 -03:00
ReinUsesLisp
e78d681a6c
gl_device: Black list NVIDIA 443.24 for fast buffer uploads
...
Skip fast buffer uploads on Nvidia 443.24 Vulkan beta driver on OpenGL.
This driver throws the following error when calling BufferSubData or
BufferData on buffers that are candidates for fast constant buffer
uploads. This is the equivalens to push constants on Vulkan, except that
they can access the full buffer. The error:
Unknown internal debug message. The NVIDIA OpenGL driver has encountered
an out of memory error. This application might
behave inconsistently and fail.
If this error persists on future drivers, we might have to look deeper
into this issue. For now, we can black list it and log it as a temporary
solution.
2020-06-06 02:56:42 -03:00
ReinUsesLisp
354fbe701e
renderer_opengl: Only enable DEBUG_OUTPUT when graphics debugging is enabled
...
Avoids logging when it's not relevant. This can potentially reduce
driver's internal thread overhead.
2020-06-05 21:21:12 -03:00
bunnei
98671b4cfe
Merge pull request #4013 from ReinUsesLisp/skip-no-xfb
...
vk_rasterizer: Skip transform feedbacks when extension is unavailable
2020-06-05 11:14:36 -04:00
ReinUsesLisp
5b2b6d594c
shader/texture: Join separate image and sampler pairs offline
...
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-05 00:24:51 -03:00
ReinUsesLisp
e1438f8e91
shader/track: Move bindless tracking to a separate function
2020-06-04 23:02:55 -03:00
bunnei
22369df357
Merge pull request #4031 from Morph1984/fix-gs-outputs
...
gl_shader_decompiler: Fix geometry shader outputs on Intel drivers
2020-06-04 15:18:51 -04:00
bunnei
34d4abc4f9
Merge pull request #4009 from ogniK5377/macro-jit-prod
...
video_core: Implement Macro JIT
2020-06-04 11:40:52 -04:00
David Marcec
eca3d16e54
Default init labels and use initializer list for macro engine
2020-06-04 22:23:07 +10:00
ReinUsesLisp
3d99b449d3
gl_rasterizer: Use NV_transform_feedback for XFB on assembly shaders
...
NV_transform_feedback, NV_transform_feedback2 and
ARB_transform_feedback3 with NV_transform_feedback interactions allows
implementing transform feedbacks as dynamic state.
Maxwell implements transform feedbacks as dynamic state, so using these
extensions with TransformFeedbackStreamAttribsNV allows us to properly
emulate transform feedbacks without having to recompile shaders when the
state changes.
2020-06-03 20:22:12 -03:00
bunnei
c647999c61
Merge pull request #4012 from ReinUsesLisp/mipmap-overlaps
...
texture_cache: Handle overlaps with multiple subresources
2020-06-03 12:17:25 -04:00
David Marcec
411f5527d4
Mark parameters as const
2020-06-03 16:33:38 +10:00
bunnei
623b93a2b3
Merge pull request #4014 from ReinUsesLisp/astc-nvidia
...
gl_device: Avoid devices with CAVEAT_SUPPORT on ASTC
2020-06-02 17:43:33 -04:00
bunnei
597d8b4bd4
Merge pull request #4006 from ReinUsesLisp/squash-ubos
...
glsl: Squash constant buffers into a single SSBO when we hit the limit
2020-06-02 14:58:50 -04:00
LC
9a0c1456e3
Merge pull request #4016 from ReinUsesLisp/invocation-info
...
shader/other: Fix hardcoded value in S2R INVOCATION_INFO
2020-06-02 09:47:53 -04:00
LC
c5de3c1059
Merge pull request #4033 from ReinUsesLisp/vk-r16ui
...
maxwell_to_vk: Add R16UI image format
2020-06-02 09:42:49 -04:00
David Marcec
3a20e74f40
Pass by reference instead of copying parameters
2020-06-02 16:37:06 +10:00
ReinUsesLisp
866c1165af
vk_shader_decompiler: Implement atomic image operations
...
Implement atomic operations on images.
On GLSL these are atomicImage* functions (e.g. atomicImageAdd).
2020-06-02 02:20:02 -03:00
ReinUsesLisp
4a6b9a1a71
vk_rasterizer: Implement storage texels
...
This is the equivalent of an image buffer on OpenGL.
- Used by Octopath Traveler
2020-06-02 02:16:33 -03:00
ReinUsesLisp
3a59e724c9
maxwell_to_vk: Add R16UI image format
...
- Used by Octopath Traveler
2020-06-02 02:15:20 -03:00
bunnei
4511502ca6
Merge pull request #4001 from ReinUsesLisp/avoid-copies
...
buffer_cache: Avoid copying twice on certain cases
2020-06-01 16:59:17 -04:00
bunnei
bb6d93630f
Merge pull request #3998 from ReinUsesLisp/init-3d
...
maxwell_3d: Initialize more registers to their expected value
2020-06-01 16:11:56 -04:00
Morph
74f2e5f1a4
gl_shader_decompiler: Declare gl_Layer and gl_ViewportIndex within gl_PerVertex for vertex and tessellation shaders
2020-06-01 15:35:44 -04:00
Morph
70188d69b0
gl_shader_decompiler: Fix geometry shader outputs for Intel drivers
...
On Intel's proprietary drivers, gl_Layer and gl_ViewportIndex are not allowed members of gl_PerVertex block, causing the shader to fail to compile. Fix this by declaring these variables outside of gl_PerVertex.
2020-06-01 15:34:05 -04:00
Rodrigo Locatti
3a6714ab7f
Merge pull request #4005 from ReinUsesLisp/g24r8
...
format_lookup_table: Implement G24S8 format as S8Z24
2020-06-01 16:07:58 -03:00
bunnei
6c0b1a9ee2
Merge pull request #3996 from ReinUsesLisp/front-faces
...
fixed_pipeline_state,gl_rasterizer: Swap negative viewport checks for front faces
2020-06-01 14:04:35 -04:00
ReinUsesLisp
0ee310ebdc
gl_device: Avoid devices with CAVEAT_SUPPORT on ASTC
...
This avoids using Nvidia's ASTC decoder on OpenGL.
The last time it was profiled, it was slower than yuzu's decoder.
While we are at it, fix a bug in the texture cache when native ASTC is
not supported.
2020-05-31 21:34:34 -03:00
ReinUsesLisp
ee21e4ecd3
glsl: Squash constant buffers into a single SSBO when we hit the limit
...
Avoids compilation errors at the cost of shader build times and runtime
performance when a game hits the limit of uniform buffers we can use.
2020-05-31 21:33:49 -03:00
bunnei
e68ee43a1a
Merge pull request #3930 from ReinUsesLisp/animal-borders
...
vk_rasterizer: Implement constant attributes
2020-05-31 18:40:17 -04:00
bunnei
edbf3144d2
Merge pull request #3958 from FernandoS27/gl-debug
...
OpenGL: Enable Debug Context and Synchronous debugging when graphics debugging is enabled
2020-05-31 17:04:27 -04:00
bunnei
f7debcaa04
Merge pull request #3999 from ReinUsesLisp/opt-tex-cache
...
texture_cache: Optimize GetSurfacesInRegion
2020-05-31 17:02:29 -04:00
Morph
bb8ef38152
gl_device: Enable compute shaders for Intel proprietary drivers
...
Previously we were disabling compute shaders on Intel's proprietary driver due to broken compute. This has been fixed in the latest Intel drivers. Re-enable compute for Intel proprietary drivers and remove the check for broken compute.
2020-05-31 03:21:07 -04:00
bunnei
058ec22787
Merge pull request #3982 from ReinUsesLisp/membar-cts
...
shader/other: Implement MEMBAR.CTS
2020-05-30 11:51:42 -04:00
ReinUsesLisp
f2d1aa97ad
shader/other: Fix hardcoded value in S2R INVOCATION_INFO
...
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-30 01:49:14 -03:00
ReinUsesLisp
1ee1a5d3d6
texture_cache: More relaxed reconstruction
...
Only reupload textures when they've not been modified from the GPU.
2020-05-29 23:56:52 -03:00
David Marcec
8118ea160b
Favor switch case over jump table
...
Easier to read and will emit a jump table automatically.
2020-05-30 12:23:58 +10:00
David Marcec
b032ebdfee
Implement macro JIT
2020-05-30 11:40:04 +10:00
David Marcec
d0bdd26c26
Add xbyak external
2020-05-30 10:55:27 +10:00
ReinUsesLisp
e454f7e7a7
texture_cache: Only copy textures that were modified from host
2020-05-29 20:12:46 -03:00
ReinUsesLisp
dd70e097cc
texture_cache: Reload textures when number of resources mismatch
2020-05-29 20:10:58 -03:00
bunnei
87b272699f
Merge pull request #4007 from ReinUsesLisp/reduce-logs
...
maxwell_3d: Reduce severity of logs that can be spammed
2020-05-29 17:29:17 -04:00
ReinUsesLisp
5616be12be
vk_rasterizer: Skip transform feedbacks when extension is unavailable
...
Avoids calling transform feedback procedures when
VK_EXT_transform_feedback is not available.
2020-05-29 03:05:29 -03:00
ReinUsesLisp
5b37cecd76
texture_cache: Handle overlaps with multiple subresources
...
Implement more surface reconstruct cases. Allow overlaps with more than
one layer and mipmap and copies all of them to the new texture.
- Fixes textures moving around objects on Xenoblade games
2020-05-29 02:57:30 -03:00
bunnei
1bb3122c1f
Merge pull request #3991 from ReinUsesLisp/depth-sampling
...
texture_cache: Implement depth stencil texture swizzles
2020-05-28 23:33:38 -04:00
ReinUsesLisp
9b06e823ee
maxwell_3d: Reduce severity of logs that can be spammed
...
These logs were killing performance on some games when they were
spammed. Reduce them to Debug severity.
2020-05-28 18:23:25 -03:00
ReinUsesLisp
fc153f6bcd
format_lookup_table: Implement G24S8 format as S8Z24
2020-05-28 17:16:07 -03:00
bunnei
099ac9c2a8
Merge pull request #3993 from ReinUsesLisp/fix-zla
...
gl_shader_manager: Unbind GLSL program when binding a host pipeline
2020-05-28 12:15:22 -04:00
ReinUsesLisp
3b2dee88e6
buffer_cache: Avoid copying twice on certain cases
...
Avoid copying to a staging buffer on non-granular memory addresses.
Add a callable argument to StreamBufferUpload to be able to copy to the
staging buffer directly from ReadBlockUnsafe.
2020-05-27 23:05:50 -03:00
ReinUsesLisp
b8b6f94ba9
texture_cache: Use unordered_map::find instead of operator[] on hot code
2020-05-27 17:59:04 -03:00
bunnei
630fc12d4e
Merge pull request #3961 from Morph1984/bgra8_srgb
...
maxwell_to_vk: Add format B8G8R8A8_SRGB and add Attachable capability for B8G8R8A8_UNORM
2020-05-27 16:44:22 -04:00
ReinUsesLisp
d2b2557542
texture_cache: Use small vector for surface vectors
...
This avoids most heap allocations when collecting surfaces into a
vector.
2020-05-27 17:31:14 -03:00
ReinUsesLisp
f3f056c3b6
maxwell_3d: Initialize line widths
...
Initialize line widths to avoid setting a line width of zero.
2020-05-27 16:53:43 -03:00
ReinUsesLisp
31eb658fea
maxwell_3d: Initialize polygon modes
...
NVN expects this to be initialized as Fill, otherwise games that never
bind a rasterizer state will log an invalid polygon mode.
2020-05-27 16:52:52 -03:00
ReinUsesLisp
32e6727dae
shader/other: Implement MEMBAR.CTS
...
This silences an assertion we were hitting and uses workgroup memory
barriers when the game requests it.
2020-05-27 00:19:45 -03:00
ReinUsesLisp
b2c4521a91
texture_cache: Fix layered null surfaces
...
Null texture cubes were not considered arrays, causing issues on Vulkan
and OpenGL when creating views.
2020-05-26 17:50:08 -03:00
ReinUsesLisp
b17fe82973
gl_texture_cache: Implement small texture view cache for swizzles
...
This fixes cases where the texture swizzle was applied twice on the same
draw to a texture bound to two different slots.
2020-05-26 17:50:08 -03:00
ReinUsesLisp
8bba84a401
texture_cache: Implement depth stencil texture swizzles
...
Stop ignoring image swizzles on depth and stencil images.
This doesn't fix a known issue on Xenoblade Chronicles 2 where an OpenGL
texture changes swizzles twice before being used. A proper fix would be
having a small texture view cache for this like we do on Vulkan.
2020-05-26 17:44:50 -03:00
ReinUsesLisp
606a62d4c7
gl_rasterizer: Port front face flip check from Vulkan
...
While Vulkan was assuming we had no negative viewports, OpenGL code
was assuming we had them. Port the old code from Vulkan to OpenGL,
checking if the first viewport is negative before flipping faces.
This is not a complete implementation since we only check for the first
viewport to be negative. That said, unless a game is using Vulkan,
OpenGL and NVN games should be fine here, and we can always compare with
our Vulkan backend to see if there's a difference.
2020-05-26 16:33:50 -03:00
ReinUsesLisp
efe7b7483b
fixed_pipeline_state: Remove unnecessary check for front faces flip
...
The check to flip faces when viewports are negative were a left over
from the old OpenGL code. This is not required on Vulkan where we have
negative viewports.
2020-05-26 16:32:27 -03:00
bunnei
508242c267
Merge pull request #3981 from ReinUsesLisp/bar
...
shader/other: Implement BAR.SYNC 0x0
2020-05-26 14:40:13 -04:00
bunnei
623d9c47a2
Merge pull request #3980 from ReinUsesLisp/red-op
...
shader/memory: Implement non-addition operations in RED
2020-05-26 12:50:41 -04:00
ReinUsesLisp
c13e2f1b75
gl_shader_manager: Unbind GLSL program when binding a host pipeline
...
Fixes regression in Link's Awakening caused by 420cc13248
2020-05-26 04:20:39 -03:00
bunnei
86345c126a
Merge pull request #3978 from ReinUsesLisp/write-rz
...
shader_decompiler: Visit source nodes even when they assign to RZ
2020-05-25 21:31:33 -04:00
bunnei
1adabdac7f
Merge pull request #3905 from FernandoS27/vulkan-fix
...
Correct a series of crashes and intructions on Async GPU and Vulkan Pipeline
2020-05-24 15:23:38 -04:00
bunnei
325e7eed3c
Merge pull request #3964 from ReinUsesLisp/arb-integration
...
renderer_opengl: Add assembly program code paths
2020-05-24 00:34:12 -04:00
bunnei
487dd05170
Merge pull request #3979 from ReinUsesLisp/thread-group
...
shader/other: Implement thread comparisons (NV_shader_thread_group)
2020-05-24 00:33:06 -04:00
ReinUsesLisp
5d0986a53b
shader/other: Implement BAR.SYNC 0x0
...
Trivially implement this particular case of BAR. Unless games use OpenCL
or CUDA barriers, we shouldn't hit any other case here.
2020-05-21 23:20:43 -03:00
ReinUsesLisp
103809a0ca
shader/memory: Implement non-addition operations in RED
...
Trivially implement these instructions. They are used in Astral Chain.
2020-05-21 23:19:46 -03:00
ReinUsesLisp
e2b67a868b
shader/other: Implement thread comparisons (NV_shader_thread_group)
...
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-21 23:18:37 -03:00
ReinUsesLisp
ed4e324991
shader_decompiler: Visit source nodes even when they assign to RZ
...
Some operations like atomicMin were ignored because they returned were
being stored to RZ. This operations have a side effect and it was being
ignored.
2020-05-21 23:16:03 -03:00
ReinUsesLisp
434856c636
vk_shader_decompiler: Don't assert for void returns
...
Atomic instructions can be used without returning anything and this is
valid code. Remove the assert.
2020-05-21 23:16:03 -03:00
ReinUsesLisp
ebaace294f
buffer_cache: Remove unused boost headers
2020-05-21 16:44:00 -03:00
ReinUsesLisp
a2dcc642c1
map_interval: Add interval allocator and drop hack
...
Drop the std::list hack to allocate memory indefinitely.
Instead use a custom allocator that keeps references valid until
destruction. This allocates fixed chunks of memory and puts pointers in
a free list. When an allocation is no longer used put it back to the
free list, this doesn't heap allocate because std::vector doesn't change
the capacity. If the free list is empty, allocate a new chunk.
2020-05-21 16:44:00 -03:00
ReinUsesLisp
19d4f28001
buffer_cache: Use boost::container::small_vector for maps in range
...
Most overlaps in the buffer cache only contain one mapped address.
We can avoid close to all heap allocations once the buffer cache is
warmed up by using a small_vector with a stack size of one.
2020-05-21 16:44:00 -03:00
ReinUsesLisp
891236124c
buffer_cache: Use boost::intrusive::set for caching
...
Instead of using boost::icl::interval_map for caching, use
boost::intrusive::set. interval_map is intended as a container where the
keys can overlap with one another; we don't need this for caching
buffers and a std::set-like data structure that allows us to search with
lower_bound is enough.
2020-05-21 16:44:00 -03:00
ReinUsesLisp
3b0baf746e
buffer_cache: Remove shared pointers
...
Removing shared pointers is a first step to be able to use intrusive
objects and keep allocations close to one another in memory.
2020-05-21 16:02:54 -03:00
ReinUsesLisp
599274e3f0
buffer_cache: Minor style changes
...
Minor style changes. Mostly done so I avoid editing it while doing other
changes.
2020-05-21 16:02:20 -03:00
ReinUsesLisp
420cc13248
renderer_opengl: Add assembly program code paths
...
Add code required to use OpenGL assembly programs based on
NV_gpu_program5. Decompilation for ARB programs is intended to be added
in a follow up commit. This does **not** include ARB decompilation and
it's not in an usable state.
The intention behind assembly programs is to reduce shader stutter
significantly on drivers supporting NV_gpu_program5 (and other required
extensions). Currently only Nvidia's proprietary driver supports these
extensions.
Add a UI option hidden for now to avoid people enabling this option
accidentally.
This code path has some limitations that OpenGL compatibility doesn't
have:
- NV_shader_storage_buffer_object is limited to 16 entries for a single
OpenGL context state (I don't know if this is an intended limitation, an
specification issue or I am missing something). Currently causes issues
on The Legend of Zelda: Link's Awakening.
- NV_parameter_buffer_object can't bind buffers using an offset
different to zero. The used workaround is to copy to a temporary buffer
(this doesn't happen often so it's not an issue).
On the other hand, it has the following advantages:
- Shaders build a lot faster.
- We have control over how floating point rounding is done over
individual instructions (SPIR-V on Vulkan can't do this).
- Operations on shared memory can be unsigned and signed.
- Transform feedbacks are dynamic state (not yet implemented).
- Parameter buffers (uniform buffers) are per stage, matching NVN and
hardware's behavior.
- The API to bind and create assembly programs makes sense, unlike
ARB_separate_shader_objects.
2020-05-19 18:00:04 -03:00
Morph
d0fc12684a
maxwell_to_vk: Add format B8G8R8A8_SRGB
...
Add format B8G8R8A8_SRGB and add Attachable capability for B8G8R8A8_UNORM
Used by Bravely Default II
2020-05-18 13:02:09 -04:00
Fernando Sahmkow
4cff5dd194
OpenGL: Enable Debug Context and Synchronous debugging when graphics debugging is enabled.
...
This commit aims to help easing debugging of driver crashes without
having to modify existing code.
2020-05-17 21:45:09 -04:00
David Marcec
4b9504028d
DmaPusher: Remove dead code in step
2020-05-16 12:42:27 +10:00
ReinUsesLisp
7a27b7f3a3
vk_rasterizer: Match OpenGL's FlushAndInvalidate behavior
...
Match OpenGL's behavior. This can fix or simplify bisecting issues on
Vulkan.
2020-05-15 20:40:08 -03:00
bunnei
b1a1bd12ca
Merge pull request #3899 from ReinUsesLisp/float-comparisons
...
shader_ir: Add separate instructions for ordered and unordered comparisons and fix NE on GLSL
2020-05-13 09:51:14 -04:00
ReinUsesLisp
91dddca26e
vk_rasterizer: Implement constant attributes
...
Constant attributes (in OpenGL known disabled attributes) are not
supported on Vulkan, even with extensions. To emulate this behavior we
return zero on reads from disabled vertex attributes in shader code.
This has no caching cost because attribute formats are not dynamic state
on Vulkan and we have to store it in the pipeline cache anyway.
- Fixes Animal Crossing: New Horizons terrain borders
2020-05-13 04:36:47 -03:00
ReinUsesLisp
cf6a40fc12
vk_rasterizer: Remove buffer check in attribute selection
...
This was a left over from OpenGL when disabled buffers where not properly
emulated. We no longer have to assert this as it is checked in vertex
buffer initialization.
2020-05-13 04:36:47 -03:00
bunnei
1beaebe666
Merge pull request #3816 from ReinUsesLisp/vk-rasterizer-enable
...
vk_graphics_pipeline: Implement rasterizer_enable on Vulkan
2020-05-11 18:22:51 -04:00
ReinUsesLisp
8b329ddcc9
gl_shader_decompiler: Properly emulate NaN behaviour on NE
...
"Not equal" operators on GLSL seem to behave as unordered when we expect
an ordered comparison.
Manually emulate this checking for LGE values (numbers, not-NaNs).
2020-05-10 02:59:33 -03:00
Fernando Sahmkow
1887afaf9e
RasterizerCache: Correct documentation.
2020-05-09 21:03:39 -04:00
Fernando Sahmkow
8d15f8b28e
VkPipelineCache: Use a null shader on invalid address.
2020-05-09 20:51:34 -04:00
Fernando Sahmkow
0a4be73b9b
VideoCore: Use SyncGuestMemory mechanism for Shader/Pipeline Cache invalidation.
2020-05-09 19:25:29 -04:00
Rodrigo Locatti
7e376af8fc
Merge pull request #3839 from Morph1984/r8g8ui
...
texture: Implement R8G8UI
2020-05-09 05:28:55 -03:00
ReinUsesLisp
4e57f9d5cf
shader_ir: Separate float-point comparisons in ordered and unordered
...
This allows us to use native SPIR-V instructions without having to
manually check for NAN.
2020-05-09 04:55:15 -03:00
bunnei
a9ee6e346b
Merge pull request #3842 from makigumo/maxwell_to_vk_vertexattribute_signed_int
...
maxwell_to_vk: implement missing signed int formats
2020-05-09 00:36:09 -04:00
bunnei
50c27d5ae1
Merge pull request #3885 from ReinUsesLisp/viewport-swizzles
...
video_core: Implement viewport swizzles with NV_viewport_swizzle
2020-05-08 15:16:53 -04:00
bunnei
028f6fdbf6
Merge pull request #3884 from ReinUsesLisp/border-colors
...
vk_sampler_cache: Use VK_EXT_custom_border_color when available
2020-05-07 12:18:53 -04:00
bunnei
41682e0888
Merge pull request #3815 from FernandoS27/command-list-2
...
GPU: More optimizations to GPU Command List Processing and DMA Copy Optimizations
2020-05-05 17:12:42 -04:00
bunnei
eb2c50c5e6
Update src/video_core/gpu.cpp
...
Co-authored-by: David <25727384+ogniK5377@users.noreply.github.com>
2020-05-05 15:39:44 -04:00
bunnei
ea09930196
Update src/video_core/gpu.cpp
...
Co-authored-by: David <25727384+ogniK5377@users.noreply.github.com>
2020-05-05 15:39:37 -04:00
ReinUsesLisp
227278098a
vk_sampler_cache: Use VK_EXT_custom_border_color when available
...
This should fix grass interactions on Breath of the Wild on Vulkan.
It is currently untested against validation layers.
Nvidia's Windows 443.09 beta driver or Linux 440.66.12 is required for
now.
2020-05-04 20:49:23 -03:00
ReinUsesLisp
2dbf5290f2
vk_graphics_pipeline: Implement viewport swizzles with NV_viewport_swizzle
2020-05-04 18:31:17 -03:00
ReinUsesLisp
f813cd3ff7
gl_rasterizer: Implement viewport swizzles with NV_viewport_swizzle
2020-05-04 17:51:30 -03:00
ReinUsesLisp
9b8e962368
maxwell_3d: Add viewport swizzles
2020-05-04 17:50:59 -03:00
bunnei
2aff0b4733
Merge pull request #3808 from ReinUsesLisp/wait-for-idle
...
{maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers
2020-05-03 02:43:18 -04:00
bunnei
f4ca8e0d3e
Merge pull request #3732 from lioncash/header
...
vulkan: Remove unnecessary includes
2020-05-02 01:36:57 -04:00
bunnei
0128901102
Merge pull request #3809 from ReinUsesLisp/empty-index
...
vk_rasterizer: Skip index buffer setup when vertices are zero
2020-05-02 01:21:57 -04:00
ReinUsesLisp
3b668e1210
vk_graphics_pipeline: Implement rasterizer_enable on Vulkan
...
We can simply enable rasterizer discard matching the current pipeline
key.
2020-05-02 01:47:25 -03:00
bunnei
e6b4311178
Merge pull request #3693 from ReinUsesLisp/clean-samplers
...
shader/texture: Support multiple unknown sampler properties
2020-05-02 00:45:41 -04:00
Jan Beich
b4d0724a63
fixed_pipeline_state: explicitly use template keyword after 1f345ebe3a
...
In file included from src/video_core/renderer_opengl/renderer_opengl.cpp:25:
In file included from src/./video_core/renderer_opengl/gl_rasterizer.h:26:
In file included from src/./video_core/renderer_opengl/gl_fence_manager.h:11:
src/./video_core/fence_manager.h:91:32: error: use 'template' keyword
to treat 'Write' as a dependent template name
memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload());
^
template
src/./video_core/fence_manager.h:137:32: error: use 'template'
keyword to treat 'Write' as a dependent template name
memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload());
^
template
2020-05-01 23:38:23 +00:00
Dan
96ee1b42bc
maxwell_to_vk: implement missing signed int formats
2020-04-30 23:39:16 +02:00
Morph
7909860d16
texture: Implement R8G8UI
...
- Used by The Walking Dead: The Final Season
2020-04-30 13:19:36 -04:00
bunnei
bf3f030a0d
Merge pull request #3807 from ReinUsesLisp/fix-depth-clamp
...
maxwell_3d: Fix depth clamping register
2020-04-30 13:07:31 -04:00
bunnei
c7b5a87c90
Merge pull request #3799 from ReinUsesLisp/iadd-cc
...
shader: Implement P2R CC, IADD Rd.CC and IADD.X
2020-04-30 12:56:36 -04:00
bunnei
da2b8295e1
Merge pull request #3805 from ReinUsesLisp/preserve-contents
...
texture_cache: Reintroduce preserve_contents accurately
2020-04-30 12:56:19 -04:00
bunnei
6572660fde
Merge pull request #3788 from FernandoS27/revert
...
Revert: shader_decode: Fix LD, LDG when track constant buffer.
2020-04-30 12:55:39 -04:00
Lioncash
6c53edd4d3
vulkan: Remove unnecessary includes
...
Reduces some header churn and reduces rebuilds when some header
internals change.
While we're at it we can also resolve a missing include in buffer_cache.
2020-04-28 21:54:46 -04:00
ReinUsesLisp
871aadbe36
shader/arithmetic_integer: Fix tracking issue in temporary
...
This temporary is not needed as we mark Rd.CC + IADD.X as unimplemented.
It caused issues when tracking global buffers.
2020-04-28 17:14:53 -03:00
Fernando Sahmkow
9df67b2095
Clang Format and Documentation.
2020-04-28 14:02:51 -04:00
Fernando Sahmkow
37c690576f
MaxwellDMA: Optimize micro copies.
2020-04-28 13:44:14 -04:00
bunnei
72b73d22ab
Merge pull request #3784 from ReinUsesLisp/shader-memory-util
...
shader/memory_util: Deduplicate code
2020-04-28 12:05:50 -04:00
ReinUsesLisp
d6a24b4a5b
vk_rasterizer: Skip index buffer setup when vertices are zero
...
Xenoblade 2 invokes a draw call with zero vertices.
This is likely due to indirect drawing (glDrawArraysIndirect).
This causes a crash in the staging buffer pool when trying to create a
buffer with a size of zero. To workaround this, skip index buffer setup
entirely when the number of indices is zero.
2020-04-28 02:24:33 -03:00
ReinUsesLisp
fe931ac976
{maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers
...
Drop MemoryBarrier from the buffer cache and use Maxwell3D's register
WaitForIdle.
To implement this on OpenGL we just call glMemoryBarrier with the
necessary bits.
Vulkan lacks this synchronization primitive, so we set an event and
immediately wait for it. This is not a pretty solution, but it's what
Vulkan can do without submitting the current command buffer to the queue
(which ends up being more expensive on the CPU).
2020-04-28 02:18:12 -03:00
Fernando Sahmkow
b87422a86f
VideoCore/GPU: Delegate subchannel engines to the dma pusher.
2020-04-27 22:07:21 -04:00
Fernando Sahmkow
90e5694230
VideoCore/Engines: Refactor Engines CallMethod.
2020-04-27 21:47:58 -04:00
ReinUsesLisp
bb1ed66d99
maxwell_3d: Fix depth clamping register
...
Using deko3d as reference:
4e47ba0013/source/maxwell/gpu_3d_state.cpp (L42)
We were using bits 3 and 4 to determine depth clamping, but these are
the same both enabled and disabled:
state->depthClampEnable ? 0x101A : 0x181D
The same happens on Nvidia's OpenGL driver, where they do something like
this (default capabilities, GL 4.5 compatibility):
(state & DEPTH_CLAMP) != 0 ? 0x201a : 0x281c
There's always a difference between the first bits in this register, but
bit 11 is consistently disabled on both deko3d/NVN and OpenGL. This
commit changes yuzu's behaviour to use bit 11 to determine depth
clamping.
- Fixes depth issues on Super Mario Odyssey's intro.
2020-04-27 20:50:14 -03:00
Fernando Sahmkow
1517cba8ca
Merge pull request #3766 from ReinUsesLisp/renderpass-cache-key
...
vk_renderpass_cache: Pack renderpass cache key and unify keys
2020-04-27 16:05:14 -04:00
Fernando Sahmkow
a65e9ad552
Merge pull request #3756 from ReinUsesLisp/integrated-devices
...
vk_memory_manager: Remove unified memory model flag
2020-04-27 16:04:22 -04:00
bunnei
6c7d8073be
Merge pull request #3742 from FernandoS27/command-list
...
Optimize GPU Command Lists and Introduce Fast GPU Time Option
2020-04-27 00:18:46 -04:00
ReinUsesLisp
8da16cf9fb
texture_cache: Reintroduce preserve_contents accurately
...
This reverts commit 94b0e2e5da
.
preserve_contents proved to be a meaningful optimization. This commit
reintroduces it but properly implemented on OpenGL.
We have to make sure the clear removes all the previous contents of the
image.
It's not currently implemented on Vulkan because we can do smart things
there that's preferred to be introduced in a separate commit.
2020-04-26 19:53:02 -03:00
Rodrigo Locatti
7e38dd580f
Merge pull request #3753 from ReinUsesLisp/ac-vulkan
...
{gl,vk}_rasterizer: Add lazy default buffer maker and use it for empty buffers
2020-04-26 01:55:43 -03:00
ReinUsesLisp
ddd82ef42b
shader/memory_util: Deduplicate code
...
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.
2020-04-26 01:38:51 -03:00
ReinUsesLisp
e895a4e2d7
shader/arithmetic_integer: Fix edge case and mark IADD.X Rd.CC as unimplemented
...
IADD.X Rd.CC requires some extra logic that is not currently
implemented. Abort when this is hit.
2020-04-25 22:58:33 -03:00
ReinUsesLisp
2a96bea6a7
shader/arithmetic_integer: Change IAdd to UAdd to avoid signed overflow
...
Signed integer addition overflow might be undefined behavior. It's free
to change operations to UAdd and use unsigned integers to avoid
potential bugs.
2020-04-25 22:57:54 -03:00
ReinUsesLisp
c788f9c0bd
shader/arithmetic_integer: Implement IADD.X
...
IADD.X takes the carry flag and adds it to the result. This is generally
used to emulate 64-bit operations with 32-bit registers.
2020-04-25 22:56:11 -03:00
ReinUsesLisp
255197e643
shader/arithmetic_integer: Implement CC for IADD
2020-04-25 22:55:26 -03:00
ReinUsesLisp
ffc5ec6fa8
decode/register_set_predicate: Implement CC
...
P2R CC takes the state of condition codes and puts them into a register.
We already have this implemented for PR (predicates). This commit
implements CC over that.
2020-04-25 22:54:42 -03:00
ReinUsesLisp
d523734266
decode/register_set_predicate: Use move for shared pointers
...
Avoid atomic counters used by shared pointers.
2020-04-25 22:54:14 -03:00
bunnei
c5bf693882
Merge pull request #3721 from ReinUsesLisp/sort-devices
...
vulkan/wrapper: Sort physical devices
2020-04-25 03:27:40 -04:00
bunnei
4e37825dab
Merge pull request #3734 from ReinUsesLisp/half-float-mods
...
decode/arithmetic_half: Fix HADD2 and HMUL2 absolute and negation bits
2020-04-25 00:41:43 -04:00
ReinUsesLisp
527a1574c3
vk_rasterizer: Pack texceptions and color formats on invalid formats
...
Sometimes for unknown reasons NVN games can bind a render target format
of 0. This may be a yuzu bug.
With the commits before this the formats were specified without being
"packed", assuming all formats and texceptions will be written like in
the color_attachments vector.
To address this issue, iterate all render targets and pack them as they
are valid. This way they will match color_attachments.
- Fixes validation errors and graphical issues on Breath of the Wild.
2020-04-24 22:21:29 -03:00
bunnei
7c8acb0025
Merge pull request #3749 from ReinUsesLisp/lea-imm
...
shader/arithmetic_integer: Fix LEA_IMM encoding
2020-04-24 14:30:13 -04:00
Fernando Sahmkow
d8a961cd6c
Revert: shader_decode: Fix LD, LDG when track constant buffer.
2020-04-24 11:00:54 -04:00
Markus Wick
e717a1df20
Fix -Wdeprecated-copy warning.
2020-04-24 09:33:04 +02:00
Markus Wick
c499c22cf7
Fix -Werror=conversion error.
2020-04-24 09:33:04 +02:00
ReinUsesLisp
dbaebd8582
decode/arithmetic_half: Fix HADD2 and HMUL2 absolute and negation bits
...
The encoding for negation and absolute value was wrong.
Extracting is now done manually. Similar instructions having different
encodings is the rule, not the exception. To keep sanity and readability
I preferred to extract the desired bit manually.
This is implemented against nxas:
8dbc389957/table.h (L68)
That is itself tested against nvdisasm (Nvidia's official disassembler).
2020-04-23 18:29:38 -03:00
ReinUsesLisp
4fb921ff6b
shader/texture: Support multiple unknown sampler properties
...
This allows deducing some properties from the texture instruction before
asking the runtime. By doing this we can handle type mismatches in some
instructions from the renderer instead of the shader decoder.
Fixes texelFetch issues with games using 2D texture instructions on a 1D
sampler.
2020-04-23 18:04:13 -03:00
ReinUsesLisp
72deb773fd
shader_ir: Turn classes into data structures
2020-04-23 18:00:06 -03:00
ReinUsesLisp
3e35101895
vk_rasterizer: Fix framebuffer creation validation errors
...
Framebuffer creation was ignoring the number of color attachments.
2020-04-23 17:34:16 -03:00
ReinUsesLisp
8c37cd1af6
vk_pipeline_cache: Unify pipeline cache keys into a single operation
...
This allows us to call Common::CityHash and std::memcmp only once for
GraphicsPipelineCacheKey. While we are at it, do the same for compute.
2020-04-23 17:34:16 -03:00
ReinUsesLisp
f665c92114
vk_renderpass_cache: Pack renderpass cache key to 12 bytes
2020-04-23 17:34:16 -03:00
bunnei
ff0c49e1ce
kernel: memory: Improve implementation of device shared memory. ( #3707 )
...
* kernel: memory: Improve implementation of device shared memory.
* fixup! kernel: memory: Improve implementation of device shared memory.
* fixup! kernel: memory: Improve implementation of device shared memory.
2020-04-23 11:37:12 -04:00
Fernando Sahmkow
5c9feaebb6
Clang Format.
2020-04-23 08:52:58 -04:00
Fernando Sahmkow
b8aef40c56
GPU: Add Fast GPU Time Option.
2020-04-23 08:52:57 -04:00
Fernando Sahmkow
18a88d19dc
Maxwell3D: Process Macros on MultiMethod.
2020-04-23 08:52:56 -04:00
Fernando Sahmkow
3fedcc2f6e
DMAPusher: Propagate multimethod writes into the engines.
2020-04-23 08:52:55 -04:00
bunnei
2409fedacf
Merge pull request #3697 from lioncash/declarations
...
CMakeLists: Enable -Wmissing-declarations on Linux builds
2020-04-23 02:18:52 -04:00
bunnei
bf2ddb8fd5
Merge pull request #3677 from FernandoS27/better-sync
...
Introduce Predictive Flushing and Improve ASYNC GPU
2020-04-22 22:09:38 -04:00
ReinUsesLisp
d9463f4562
vk_pipeline_cache: Fix unintentional memcpy into optional
...
The intention behind this was to assign a float to from an uint32_t, but
it was unintentionally being copied directly into the std::optional.
Copy to a temporary and assign that temporary to std::optional. This can
be replaced with std::bit_cast<float> once we are in C++20.
2020-04-22 21:36:05 -03:00
Fernando Sahmkow
c043ac4f13
GL_Fence_Manager: use GL_TIMEOUT_IGNORED instead of a loop,
2020-04-22 20:34:32 -04:00
Fernando Sahmkow
afae40a99e
Merge pull request #3653 from ReinUsesLisp/nsight-aftermath
...
renderer_vulkan: Integrate Nvidia Nsight Aftermath on Windows
2020-04-22 11:39:01 -04:00
Fernando Sahmkow
4e37f1b113
Address Feedback.
2020-04-22 11:36:27 -04:00
Fernando Sahmkow
39e5b72948
Async GPU: Correct flushing behavior to be similar to old async GPU behavior.
2020-04-22 11:36:26 -04:00
Fernando Sahmkow
1b3be8a8f8
MaxwellDMA: Correct copying on accuracy level.
2020-04-22 11:36:25 -04:00
Fernando Sahmkow
644588fd88
ShaderCache/PipelineCache: Cache null shaders.
2020-04-22 11:36:25 -04:00
Fernando Sahmkow
f616dc0b59
Address Feedback.
2020-04-22 11:36:24 -04:00
Fernando Sahmkow
ec2f3e48e1
Fix GCC error.
2020-04-22 11:36:23 -04:00
Fernando Sahmkow
b3e5f177ba
QueryCache: Only do async flushes on async gpu.
2020-04-22 11:36:21 -04:00
Fernando Sahmkow
f4ab223ef0
Async GPU: Only do reactive flushing on Extreme Level.
2020-04-22 11:36:20 -04:00
ReinUsesLisp
b752faf2d3
vk_fence_manager: Initial implementation
2020-04-22 11:36:19 -04:00
Fernando Sahmkow
0649f05900
QueryCache: Implement Async Flushes.
2020-04-22 11:36:18 -04:00
Fernando Sahmkow
131b342130
OpenGL: Guarantee writes to Buffers.
2020-04-22 11:36:18 -04:00
Fernando Sahmkow
1fb516cd97
GPU: Implement Flush Requests for Async mode.
2020-04-22 11:36:17 -04:00
Fernando Sahmkow
b7bc3c2549
FenceManager: Manage syncpoints and rename fences to semaphores.
2020-04-22 11:36:16 -04:00
Fernando Sahmkow
96bb961a64
BufferCache: Refactor async managing.
2020-04-22 11:36:15 -04:00
Fernando Sahmkow
b10db7e4a5
FenceManager: Implement async buffer cache flushes on High settings
2020-04-22 11:36:15 -04:00
Fernando Sahmkow
4adfc9bb08
Rasterizer: Document SignalFence & ReleaseFences and setup skeletons on Vulkan.
2020-04-22 11:36:14 -04:00
Fernando Sahmkow
a081a7c855
GPU: Fix rebase errors.
2020-04-22 11:36:13 -04:00
Fernando Sahmkow
e84eb64e51
Rasterizer: Disable fence managing in synchronous gpu.
2020-04-22 11:36:12 -04:00
Fernando Sahmkow
165ae823f5
ThreadManager: Sync async reads on accurate gpu.
2020-04-22 11:36:12 -04:00
Fernando Sahmkow
57fdbd9b89
FenceManager: Implement should wait.
2020-04-22 11:36:11 -04:00
Fernando Sahmkow
1f345ebe3a
GPU: Implement a Fence Manager.
2020-04-22 11:36:10 -04:00
Fernando Sahmkow
487379c593
OpenGL: Implement Fencing backend.
2020-04-22 11:36:10 -04:00
Fernando Sahmkow
ed7e965712
TextureCache: Flush linear textures after finishing rendering.
2020-04-22 11:36:09 -04:00
Fernando Sahmkow
339d0d9d6c
GPU: Delay Fences.
2020-04-22 11:36:08 -04:00
Fernando Sahmkow
8b1eb44b3e
BufferCache: Implement OnCPUWrite and SyncGuestHost
2020-04-22 11:36:07 -04:00
Fernando Sahmkow
da8f17715d
GPU: Refactor synchronization on Async GPU
2020-04-22 11:36:06 -04:00
Fernando Sahmkow
a60a22d9c2
Texture Cache: Implement OnCPUWrite and SyncGuestHost
2020-04-22 11:36:05 -04:00
Fernando Sahmkow
084ceb925a
UI: Replasce accurate GPU option for GPU Accuracy Level
2020-04-22 11:36:04 -04:00
ReinUsesLisp
6f47bd9641
vk_memory_manager: Remove unified memory model flag
...
All drivers (even Intel) seem to have a device local memory type that is
not host visible. Remove this flag so all devices follow the same path.
This fixes a crash when trying to map to host device local memory on
integrated devices.
2020-04-21 22:06:38 -03:00
bunnei
d64290884a
Merge pull request #3714 from lioncash/copies
...
gl_shader_decompiler: Avoid copies where applicable
2020-04-21 20:16:02 -04:00
ReinUsesLisp
488ed8bd02
vk_rasterizer: Add lazy default buffer maker and use it for empty buffers
...
Introduce a default buffer getter that lazily constructs an empty
buffer. This is intended to match OpenGL's buffer 0.
Use this for disabled vertex and uniform buffers.
While we are at it, include vertex buffer usages for staging buffers to
silence validation errors.
2020-04-21 19:55:52 -03:00
ReinUsesLisp
0bbae63300
gl_rasterizer: Fix buffers without size
...
On NVN buffers can be enabled but have no size. According to deko3d and
the behavior we see in Animal Crossing: New Horizons these buffers get
the special address of 0x1000 and limit themselves to 0xfff.
Implement buffers without a size by binding a null buffer to OpenGL
without a side.
1d1930beea/source/maxwell/gpu_3d_vbo.cpp (L62-L63)
2020-04-21 19:55:44 -03:00
Rodrigo Locatti
f293b15611
Merge pull request #3718 from ReinUsesLisp/better-pipeline-state
...
fixed_pipeline_state: Pack structure, use memcmp and CityHash on it
2020-04-21 18:17:58 -03:00
bunnei
9bf3abcb63
Merge pull request #3698 from lioncash/warning
...
General: Resolve minor assorted warnings
2020-04-21 14:11:18 -04:00
bunnei
d3e0cefa60
Merge pull request #3695 from ReinUsesLisp/default-attributes
...
maxwell_3d: Initialize format attributes constant as one
2020-04-20 21:40:18 -04:00
ReinUsesLisp
8734ccb0cb
shader/arithmetic_integer: Fix LEA_IMM encoding
...
The operand order in LEA_IMM was flipped compared to nvdisasm. Fix that
using nxas as reference:
8dbc389957/table.h (L122)
2020-04-20 21:54:59 -03:00
Mat M
cb5b8ca886
Merge pull request #3733 from ambasta/patch-2
...
Initialize quad_indexed_pass before uint8_pass
2020-04-20 20:36:46 -04:00
Fernando Sahmkow
ec2f8f4272
Merge pull request #3700 from ReinUsesLisp/stream-buffer-sizes
...
vk_stream_buffer: Fix out of memory on boot on recent Nvidia drivers
2020-04-20 09:37:42 -04:00
Amit Prakash Ambasta
5324b1d01e
Initialize quad_indexed_pass before uint8_pass
...
Fixes Werror=reorder in gcc
2020-04-20 04:53:52 +05:30
Rodrigo Locatti
4932010c6f
Merge pull request #3729 from lioncash/globals
...
dma_pusher: Remove reliance on the global system instance
2020-04-19 19:12:40 -03:00
bunnei
85c17a2c35
Merge pull request #3694 from ReinUsesLisp/indexed-quads
...
vk_compute_pass: Implement indexed quads
2020-04-19 16:52:40 -04:00
Lioncash
44e959157b
dma_pusher: Remove reliance on the global system instance
...
With this, the video core is now has no calls to the global system
instance at all.
2020-04-19 16:12:08 -04:00
bunnei
2ea7a70da0
Merge pull request #3686 from lioncash/table
...
texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indices
2020-04-19 15:33:33 -04:00
bunnei
73db83c0ab
Merge pull request #3679 from lioncash/track
...
track: Eliminate redundant copies
2020-04-19 01:22:47 -04:00
Jan Beich
afcc84a172
renderer_vulkan: assume X11 if not Windows/macOS after bf1d66b7c0
...
Render.Vulkan <Error> video_core/renderer_vulkan/renderer_vulkan.cpp:CreateInstance:131: Presentation not supported on this platform
Render.Vulkan <Error> video_core/renderer_vulkan/renderer_vulkan.cpp:CreateSurface:378: Presentation not supported on this platform
Core <Critical> core/core.cpp:Load:199: Failed to initialize system (Error 5)!
2020-04-19 00:32:23 +00:00
ReinUsesLisp
c81bf06d03
vulkan/wrapper: Sort physical devices
...
Sort discrete GPUs over the rest, Nvidia over AMD, AMD over Intel, Intel
over the rest. This gives us a somewhat consistent order when Optimus
is removed (renderdoc does this when it's attached).
This can break the configuration of users with an Intel GPU that
manually remove Optimus on yuzu. That said, it's a very unlikely to
happen.
2020-04-18 21:31:15 -03:00
ReinUsesLisp
d62f57cf5a
fixed_pipeline_state: Hash and compare the whole structure
...
Pad FixedPipelineState's size to 384 bytes to be a multiple of 16.
Compare the whole struct with std::memcmp and hash with CityHash. Using
CityHash instead of a naive hash should reduce the number of collisions.
Improve used type traits to ensure this operation is safe.
With these changes the improvements to the hashable pipeline state are:
Optimized structure
Hash: 89 ns
Comparison: 103 ns
Construction*: 164 ns
Struct size: 384 bytes
Original structure
Hash: 148 ns
Equal: 174 ns
Construction*: 281 ns
Size: 1384 bytes
* Attribute state initialization is not measured
These measures are averages taken with std::chrono::high_accuracy_clock
on MSVC shipped on Visual Studio 16.6.0 Preview 2.1.
2020-04-18 19:57:26 -03:00
ReinUsesLisp
b571c92dfd
fixed_pipeline_state: Pack blending state
...
Reduce FixedPipelineState's size to 364 bytes.
2020-04-18 19:23:35 -03:00
ReinUsesLisp
548dd27f45
fixed_pipeline_state: Pack rasterizer state
...
Reduce FixedPipelineState's size to 600 bytes.
2020-04-18 19:22:57 -03:00
ReinUsesLisp
7790144a55
fixed_pipeline_state: Pack depth stencil state
...
Reduce FixedPipelineState's size to 632 bytes.
2020-04-18 19:22:11 -03:00
ReinUsesLisp
ab6704f20c
fixed_pipeline_state: Pack attribute state
...
Reduce FixedPipelineState's size from 1384 to 664 bytes
2020-04-18 19:21:19 -03:00
Mat M
5305806071
Merge pull request #3716 from bunnei/fix-another-impl-fallthrough
...
video_core: gl_shader_decompiler: Fix implicit fallthrough errors.
2020-04-18 15:17:52 -04:00
bunnei
03726fb7f5
video_core: gl_shader_decompiler: Fix implicit fallthrough errors.
2020-04-18 15:15:21 -04:00
Lioncash
bf328ed35a
gl_shader_decompiler: Avoid copies where applicable
...
Avoids unnecessary reference count increments where applicable and also
avoids reallocating a vector.
Unlikely to make a huge difference, but given how trivial of an
amendment it is, why not?
2020-04-17 20:48:52 -04:00
Markus Wick
07fbef1776
video_code: Fix implicit switch fallthrough.
...
Since yesterday, this breaks the build on linux.
So let's fix it.
2020-04-17 23:43:35 +02:00
ReinUsesLisp
a7b6bd56d7
vk_stream_buffer: Fix out of memory on boot on recent Nvidia drivers
...
Nvidia recently introduced a new memory type for data streaming
(awesome!), but yuzu was assuming that all heaps had enough memory
for the assumed stream buffer size (256 MiB).
This worked fine on AMD but Nvidia's new memory heap was smaller than
256 MiB. This commit changes this assumption and allocates a bit less
than the size of the preferred heap, with a maximum of 256 MiB (to avoid
allocating all system memory on integrated devices).
- Fixes a crash on NVIDIA 450.82.0.0
2020-04-17 18:12:48 -03:00
Rodrigo Locatti
990c0b184f
Revert "gl_shader_cache: Use CompileDepth::FullDecompile on GLSL"
2020-04-17 17:41:48 -03:00
bunnei
b8f5c71f2d
Merge pull request #3666 from bunnei/new-vmm
...
Implement a new virtual memory manager
2020-04-17 16:33:08 -04:00
bunnei
ca3af2961c
Merge pull request #3682 from lioncash/uam
...
gl_query_cache: Resolve use-after-move in CachedQuery move assignment operator
2020-04-17 01:24:08 -04:00
bunnei
32fc2aae3c
video_core: memory_manager: Updates for Common::PageTable changes.
2020-04-17 00:59:34 -04:00
bunnei
4caff51710
core: memory: Move to Core::Memory namespace.
...
- helpful to disambiguate Kernel::Memory namespace.
2020-04-17 00:59:28 -04:00
Lioncash
e2d8be1ca2
General: Resolve warnings related to missing declarations
2020-04-16 23:43:34 -04:00
Lioncash
678ac54749
decode/memory: Resolve unused variable warning
...
Only the first element of the returned pair is ever used.
2020-04-16 22:45:44 -04:00
Lioncash
d159643fd7
decode/texture: Resolve unused variable warnings.
...
Some variables aren't used, so we can remove these.
Unfortunately, diagnostics are still reported on structured bindings
even when annotated with [[maybe_unused]], so we need to unpack the
elements that we want to use manually.
2020-04-16 22:45:41 -04:00
Lioncash
f522abd8ab
decode/texture: Collapse loop down into std::generate
...
Same behavior, less code.
2020-04-16 22:29:07 -04:00
Lioncash
7e2d60de26
decode/texture: Eliminate trivial missing field initializer warnings
...
We can just specify the initializers.
2020-04-16 22:27:21 -04:00
bunnei
79c1269f0f
Merge pull request #3673 from lioncash/extra
...
CMakeLists: Specify -Wextra on linux builds
2020-04-16 21:12:33 -04:00
ReinUsesLisp
238c6016f9
maxwell_3d: Initialize format attributes constant as one
...
nouveau expects this to be true but it doesn't set it.
2020-04-16 21:15:07 -03:00
ReinUsesLisp
c961770900
vk_compute_pass: Implement indexed quads
...
Implement indexed quads (GL_QUADS used with glDrawElements*) with a
compute pass conversion.
The compute shader converts from uint8/uint16/uint32 indices to uint32.
The format is passed through push constants to avoid having different
variants of the same shader.
- Used by Fast RMX
- Used by Xenoblade Chronicles 2 (it still has graphical due to
synchronization issues on Vulkan)
2020-04-16 21:12:32 -03:00
Fernando Sahmkow
c81f256111
Merge pull request #3600 from ReinUsesLisp/no-pointer-buf-cache
...
buffer_cache: Return handles instead of pointer to handles
2020-04-16 19:58:13 -04:00
ReinUsesLisp
090fd3fefa
buffer_cache: Return handles instead of pointer to handles
...
The original idea of returning pointers is that handles can be moved.
The problem is that the implementation didn't take that in mind and made
everything harder to work with. This commit drops pointer to handles and
returns the handles themselves. While it is still true that handles can
be invalidated, this way we get an old handle instead of a dangling
pointer.
This problem can be solved in the future with sparse buffers.
2020-04-16 02:33:34 -03:00
Rodrigo Locatti
a5a2ee8766
Merge pull request #3689 from lioncash/unused-var
...
decode/shift: Remove unused variable within Shift()
2020-04-16 02:05:54 -03:00
Rodrigo Locatti
d196ce0f71
Merge pull request #3688 from lioncash/nequal
...
surface_view: Add missing operator!= to ViewParams
2020-04-16 01:39:51 -03:00
Rodrigo Locatti
4209dba1f6
Merge pull request #3680 from lioncash/static
...
gl_device: Mark stage_swizzle as constexpr
2020-04-16 01:26:23 -03:00
Rodrigo Locatti
60e8de7c95
Merge pull request #3687 from lioncash/constness
...
surface_base: Make IsInside() a const member function
2020-04-16 01:22:50 -03:00
Rodrigo Locatti
612966399b
Merge pull request #3685 from lioncash/copies
...
control_flow: Make use of std::move in TryInspectAddress()
2020-04-16 01:22:40 -03:00
Lioncash
cd2a12e78f
decode/shift: Remove unused variable within Shift()
...
Removes a redundant variable that is already satisfied by the IsFull()
utility function.
2020-04-16 00:16:06 -04:00
Lioncash
5fbe8785d2
surface_view: Add missing operator!= to ViewParams
...
Provides logical symmetry to the interface.
2020-04-16 00:03:12 -04:00
Lioncash
d551c910bb
surface_base: Make IsInside() a const member function
...
This doesn't modify internal state, so this can be made const.
2020-04-15 23:59:35 -04:00
bunnei
319df1db77
Merge pull request #3683 from lioncash/docs
...
video_core: Amend doxygen comment references
2020-04-15 23:54:58 -04:00
Lioncash
636c8ab85b
texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indices
...
Previously these were all using the red component to derive the indices,
which is definitely not intentional.
2020-04-15 23:50:46 -04:00
Lioncash
72a224d3fc
control_flow: Make use of std::move in TryInspectAddress()
...
Eliminates redundant atomic reference count increments and decrements.
2020-04-15 23:31:22 -04:00
Lioncash
11837e8f13
video_core: Amend doxygen comment references
...
Fixes broken documentation references.
2020-04-15 22:33:29 -04:00
Lioncash
24620bc4ea
decode/image: Fix typo in assert in GetComponentSize()
2020-04-15 22:29:51 -04:00
Lioncash
3a60f19eaf
gl_query_cache: Resolve use-after-move in CachedQuery move assignment operator
...
Avoids potential invalid junk data from being read.
2020-04-15 22:20:06 -04:00
Lioncash
b178c9a349
decoder/image: Fix incorrect G24R8 component sizes in GetComponentSize()
...
The components' sizes were mismatched. This corrects that.
2020-04-15 22:10:44 -04:00
Lioncash
71fb156611
gl_device: Mark stage_swizzle as constexpr
...
Previously this was mutable even though it shouldn't be.
2020-04-15 21:59:13 -04:00
Lioncash
e15ec2705c
track: Eliminate redundant copies
...
Two variables can be references, while two others can be std::moved.
Makes for 4 less atomic reference count increments and decrements.
2020-04-15 21:50:09 -04:00
Lioncash
1c340c6efa
CMakeLists: Specify -Wextra on linux builds
...
Allows reporting more cases where logic errors may exist, such as
implicit fallthrough cases, etc.
We currently ignore unused parameters, since we currently have many
cases where this is intentional (virtual interfaces).
While we're at it, we can also tidy up any existing code that causes
warnings. This also uncovered a few bugs as well.
2020-04-15 21:33:46 -04:00
Rodrigo Locatti
65cbb122ea
Merge pull request #3649 from FernandoS27/3d-fix
...
Texture Cache: Read current data when flushing a 3D segment.
2020-04-15 17:06:55 -03:00
Fernando Sahmkow
e33196d4e7
Merge pull request #3612 from ReinUsesLisp/red
...
shader/memory: Implement RED.E.ADD and minor changes to ATOM
2020-04-15 15:03:49 -04:00
Lioncash
213fff67bc
CMakeLists: Make -Wreorder a compile-time error
...
This can result in silent logic bugs within code, and given the amount
of times these kind of warnings are caused, they should be flagged at
compile-time so no new code is submitted with them.
2020-04-15 14:14:41 -04:00
Mat M
64b5985f0a
Merge pull request #3662 from ReinUsesLisp/constant-attrs
...
gl_rasterizer: Implement constant vertex attributes
2020-04-15 11:54:50 -04:00
Fernando Sahmkow
6789d88a9c
Texture Cache: Read current data when flushing a 3D segment.
...
This PR corrects flushing of 3D segments when data of other segments is
mixed, this aims to preserve the data in place.
2020-04-15 11:46:17 -04:00
Mat M
9208d555b7
Merge pull request #3668 from ReinUsesLisp/vtx-format-16ui
...
maxwell_to_vk: Add uint16 vertex formats
2020-04-15 11:43:52 -04:00
Mat M
ab72696beb
Merge pull request #3656 from ReinUsesLisp/glsl-full-decompile
...
gl_shader_cache: Use CompileDepth::FullDecompile on GLSL
2020-04-15 03:17:46 -04:00
Mat M
4878d6bb49
Merge pull request #3654 from ReinUsesLisp/fix-fb-attach
...
gl_texture_cache: Fix layered texture attachment base level
2020-04-15 03:17:18 -04:00
Mat M
50c0a92db8
Merge pull request #3663 from ReinUsesLisp/fcmp-rc
...
shader/arithmetic: Add FCMP_CR variant
2020-04-15 03:16:56 -04:00
Mat M
13331a3a32
Merge pull request #3664 from ReinUsesLisp/fe3h-black-squares
...
Revert "gl_shader_decompiler: Implement merges with bitfieldInsert"
2020-04-15 03:14:28 -04:00
ReinUsesLisp
3036067047
maxwell_to_vk: Add uint16 vertex formats
2020-04-15 04:06:30 -03:00
ReinUsesLisp
b4e43c64c8
maxwell_to_vk: Add missing breaks
...
Avoid invalid fallbacks.
2020-04-15 04:05:33 -03:00
ReinUsesLisp
0ca456830f
vk_blit_screen: Initialize all members in VkPipelineViewportStateCreateInfo
...
When the dynamic state is specified, pViewports and pScissors are
ignored, quoting the specification:
pViewports is a pointer to an array of VkViewport structures, defining
the viewport transforms. If the viewport state is dynamic, this member
is ignored.
That said, AMD's proprietary driver itself seem to read it regardless of
what the specification says.
2020-04-15 03:30:08 -03:00
Rodrigo Locatti
0b132e8cc1
Merge pull request #3657 from ReinUsesLisp/viewport-zero
...
vk_rasterizer: Default to 1 viewports with a size of 0
2020-04-15 01:51:17 -03:00
Fernando Sahmkow
daddbeffd1
Texture Cache: Only do buffer copies on accurate GPU. ( #3634 )
...
This is a simple optimization as Buffer Copies are mostly used for texture recycling. They are, however, useful when games abuse undefined behavior but most 3D APIs forbid it.
2020-04-14 23:21:00 -04:00
ReinUsesLisp
fd6371eba7
Revert "gl_shader_decompiler: Implement merges with bitfieldInsert"
...
This reverts commit 05cf270836
.
Apparently the first approach using floats instead of bitfieldInert
worked better for Fire Emblem: Three Houses. Reverting to get that
behavior back.
2020-04-14 21:24:33 -03:00
ReinUsesLisp
fefe7f18f9
shader/arithmetic: Add FCMP_CR variant
...
Adds another variant of FCMP.
2020-04-14 19:11:04 -03:00
ReinUsesLisp
6dfcabc800
gl_rasterizer: Implement constant vertex attributes
...
Credits go to gdkchan from Ryujinx for finding constant attributes are
used in retail games.
2020-04-14 17:58:53 -03:00
ReinUsesLisp
37e5c4fa7c
vk_rasterizer: Default to 1 viewports with a size of 0
...
Silence validation layer errors.
2020-04-14 04:44:34 -03:00
ReinUsesLisp
453d7419d9
gl_shader_cache: Use CompileDepth::FullDecompile on GLSL
...
From my testing on a Splatoon 2 shader that takes 3800ms on average to
compile changing to FullDecompile reduces it to 900ms on average.
The shader decoder will automatically fallback to a more naive method if
it can't use full decompile.
2020-04-14 01:34:20 -03:00
ReinUsesLisp
0e232cfdc1
renderer_vulkan: Integrate Nvidia Nsight Aftermath on Windows
...
Adds optional support for Nsight Aftermath. It is enabled through
ENABLE_NSIGHT_AFTERMATH in cmake. A path to the SDK has to be provided
by the environment variable NSIGHT_AFTERMATH_SDK.
Nsight Aftermath allows an application to generate "minidumps" of the
GPU state when a device loss happens. By analysing these on Nsight we
can know what a game was doing and why it triggered a device loss.
The dump is generated inside %APPDATA%\yuzu\log\gpucrash and this
directory is deleted every time a new instance is initialized with
Nsight enabled.
To enable it on yuzu there has a to be a driver and device capable of
running Nsight Aftermath on Vulkan. That means only Turing based GPUs
on the latest stable driver, beta drivers won't work for now.
It is manually enabled in Configuration>Debug>Enable Graphics Debugging
because when using all debugging capabilities there is a runtime cost.
2020-04-14 00:39:21 -03:00
ReinUsesLisp
21dc842171
gl_texture_cache: Fix layered texture attachment base level
...
The base level is already included in the texture view. If we specify
the base level in the texture again, this will end up in the incorrect
level and potentially out of bounds.
2020-04-13 18:24:56 -03:00
ReinUsesLisp
6cfe2a7246
renderer_vulkan: Remove Nvidia checkpoints
2020-04-13 17:33:59 -03:00
ReinUsesLisp
16105c6a66
renderer_vulkan: Catch device losses in more places
2020-04-13 17:33:59 -03:00
Rodrigo Locatti
7e4a132a77
Merge pull request #3636 from ReinUsesLisp/drop-vk-hpp
...
renderer_vulkan: Drop Vulkan-Hpp
2020-04-13 17:08:04 -03:00
Mat M
fbf13d3f48
Merge pull request #3651 from ReinUsesLisp/line-widths
...
gl_rasterizer: Implement line widths and smooth lines
2020-04-13 10:19:59 -04:00
Mat M
08266d70ba
Merge pull request #3638 from ReinUsesLisp/remove-preserve-contents
...
texture_cache: Remove preserve_contents
2020-04-13 10:19:01 -04:00
Mat M
c4001225f6
Merge pull request #3631 from ReinUsesLisp/more-astc
...
texture/astc: More small ASTC optimizations
2020-04-13 10:17:32 -04:00
Mat M
7b62212461
Merge pull request #3619 from ReinUsesLisp/i2i
...
shader/conversion: Implement I2I sign extension, saturation and selection
2020-04-13 10:17:07 -04:00
Mat M
3351e1e94f
Merge pull request #3627 from ReinUsesLisp/layered-view
...
gl_texture_cache: Attach view instead of base texture for layered attchments
2020-04-13 10:16:18 -04:00
Mat M
d37d899431
Merge pull request #3646 from ReinUsesLisp/fix-glsl-turing
...
gl_shader_decompiler: Improve generated code in HMergeH*
2020-04-13 10:15:12 -04:00
Mat M
47036859eb
Merge pull request #3633 from ReinUsesLisp/clean-texdec
...
shader/texture: Remove type mismatches management from shader decoder
2020-04-13 10:13:05 -04:00
ReinUsesLisp
76615b9f34
gl_rasterizer: Implement line widths and smooth lines
...
Implements "legacy" features from OpenGL present on hardware such as
smooth lines and line width.
2020-04-13 01:30:34 -03:00
ReinUsesLisp
05cf270836
gl_shader_decompiler: Implement merges with bitfieldInsert
...
This also fixes Turing issues but it avoids doing more bitcasts. This
should improve the generated code while also avoiding more points where
compilers can flush floats.
2020-04-12 22:39:59 -03:00
Fernando Sahmkow
3d91dbb21d
Merge pull request #3578 from ReinUsesLisp/vmnmx
...
shader/video: Partially implement VMNMX
2020-04-12 10:44:03 -04:00
ReinUsesLisp
75eb953575
gl_shader_decompiler: Improve generated code in HMergeH*
...
Avoiding bitwise expressions, this fixes Turing issues in shaders using
half float merges that affected several games.
2020-04-12 05:06:55 -03:00
ReinUsesLisp
76f178ba6e
shader/video: Partially implement VMNMX
...
Implements the common usages for VMNMX. Inputs with a different size
than 32 bits are not supported and sign mismatches aren't supported
either.
VMNMX works as follows:
It grabs Ra and Rb and applies a maximum/minimum on them (this is
defined by .MX), having in mind the input sign. This result can then be
saturated. After the intermediate result is calculated, it applies
another operation on it using Rc. These operations are merges,
accumulations or another min/max pass.
This instruction allows to implement with a more flexible approach GCN's
min3 and max3 instructions (for instance).
2020-04-12 00:34:42 -03:00
ReinUsesLisp
a7baf6fee4
video_core: Add MSAA registers in 3D engine and TIC
...
This adds the registers used for multisampling. It doesn't implement
anything for now.
2020-04-12 00:21:27 -03:00
ReinUsesLisp
94b0e2e5da
texture_cache: Remove preserve_contents
...
preserve_contents was always true. We can't assume we don't have to
preserve clears because scissored and color masked clears exist.
This removes preserve_contents and assumes it as true at all times.
2020-04-11 01:51:02 -03:00
ReinUsesLisp
2905142f47
renderer_vulkan: Drop Vulkan-Hpp
2020-04-10 22:49:02 -03:00
bunnei
51c6688e21
Merge pull request #3594 from ReinUsesLisp/vk-instance
...
yuzu: Drop SDL2 and Qt frontend Vulkan requirements
2020-04-10 20:06:55 -04:00
ReinUsesLisp
a87b16da9a
shader/texture: Remove type mismatches management from shader decoder
...
Since commit e22816a5bb
we handle type mismatches from the CPU.
We don't need to hack our shader decoder due to game bugs anymore.
Removed in this commit.
2020-04-10 00:57:32 -03:00
Fernando Sahmkow
7182ef31c9
Merge pull request #3622 from ReinUsesLisp/srgb-texture-border
...
video_core/texture: Use a LUT to convert sRGB texture borders
2020-04-09 18:01:48 -04:00
ReinUsesLisp
6bf5d2b011
astc: Hard code bit depth changes to 8 and use fast replicate
2020-04-09 18:37:12 -03:00
Rodrigo Locatti
36f607217f
Merge pull request #3610 from FernandoS27/gpu-caches
...
Refactor all the GPU Caches to use VAddr for cache addressing
2020-04-09 17:59:21 -03:00
ReinUsesLisp
bd2c1ab8a0
astc: Use boost's static_vector to avoid heap allocations
2020-04-09 05:27:57 -03:00
ReinUsesLisp
5de130beea
astc: Implement a fast precompiled alternative for Replicate
2020-04-09 03:58:25 -03:00
ReinUsesLisp
6b4d4473be
astc: Move Replicate to a constexpr LUT when possible
2020-04-09 03:35:07 -03:00
ReinUsesLisp
d22a689250
astc: Make InputBitStream constexpr
2020-04-09 02:54:05 -03:00
ReinUsesLisp
0efc230381
astc: OutputBitStream style changes and make it constexpr
2020-04-09 02:37:51 -03:00
bunnei
b96fd0bd0e
Merge pull request #3601 from ReinUsesLisp/some-shader-encodings
...
video_core/shader: Add some instruction and S2R encodings
2020-04-09 00:17:39 -04:00
ReinUsesLisp
6c8f9f40d7
gl_texture_cache: Attach view instead of base texture for layered attachments
...
This way we are not ignoring the base layer of the current texture.
2020-04-08 22:20:25 -03:00
Fernando Sahmkow
7cd6daf115
VkRasterizer: Eliminate Legacy code.
2020-04-08 18:59:09 -04:00
Fernando Sahmkow
1c18dc6577
Memory: Correct GCC errors.
2020-04-08 18:09:16 -04:00
Fernando Sahmkow
913f42a3a7
Memory: Address Feedback.
2020-04-08 13:40:46 -04:00
Fernando Sahmkow
e00d992848
GPUMemoryManager: Improve safety of memory reads.
2020-04-08 12:08:06 -04:00
ReinUsesLisp
a209d464f9
video_core/textures: Move GetMaxAnisotropy to cpp file
2020-04-07 20:47:31 -03:00
ReinUsesLisp
d7db088180
video_core/texture: Use a LUT to convert sRGB texture borders
...
This is a reversed look up table extracted from
https://gist.github.com/rygorous/2203834#file-gistfile1-cpp-L41-L62
that is used in
04d4e9e587/source/maxwell/tsc_generate.cpp (L38)
Games usually bind 0xFD expecting a float texture border of 1.0f.
The conversion previous to this commit was multiplying the uint8 sRGB
texture border color by 255. This is close to 1.0f but when that
difference matters, some graphical glitches appear.
This look up table is manually changed in the edges, clamping towards
0.0f and 1.0f.
While we are at it, move this logic to its own translation unit.
2020-04-07 20:38:14 -03:00
bunnei
f316911248
Merge pull request #3599 from ReinUsesLisp/revert-3499
...
Revert "Merge pull request #3499 from ReinUsesLisp/depth-2d-array"
2020-04-07 16:51:41 -04:00
ReinUsesLisp
bf1d66b7c0
yuzu: Drop SDL2 and Qt frontend Vulkan requirements
...
Create Vulkan instances and surfaces from the Vulkan backend.
2020-04-07 16:32:19 -03:00
Rodrigo Locatti
487f9ba525
Merge pull request #3489 from namkazt/patch-2
...
shader: implement SULD.D bits32/64
2020-04-07 16:21:09 -03:00
Nguyen Dac Nam
935648ffa9
address nit.
2020-04-07 18:29:30 +07:00
ReinUsesLisp
bc1b4b85b0
renderer_vulkan: Query device names from the backend
2020-04-07 02:23:23 -03:00
ReinUsesLisp
da706cad25
shader/conversion: Implement I2I sign extension, saturation and selection
...
Reimplements I2I adding sign extension, saturation (clamp source value
to the destination), selection and destination sizes that are not 32
bits wide.
It doesn't implement CC yet.
2020-04-07 02:19:44 -03:00
Nguyen Dac Nam
bf1174c114
Apply suggestions from code review
...
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2020-04-07 07:55:49 +07:00
Fernando Sahmkow
f9d5718c4b
Clang Format.
2020-04-06 09:23:08 -04:00
Fernando Sahmkow
ea535d9470
Shader/Pipeline Cache: Use VAddr instead of physical memory for addressing.
2020-04-06 09:23:07 -04:00
Fernando Sahmkow
3dd5c07454
Query Cache: Use VAddr instead of physical memory for adressing.
2020-04-06 09:23:07 -04:00
Fernando Sahmkow
7fcd0fee6d
Buffer Cache: Use vAddr instead of physical memory.
2020-04-06 09:23:06 -04:00
Fernando Sahmkow
6ee316cb8f
Texture Cache: Use vAddr instead of physical memory for caching.
2020-04-06 09:23:05 -04:00
Fernando Sahmkow
9c0f40a1f5
GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr
2020-04-06 09:21:46 -04:00
Fernando Sahmkow
588a20be3f
Merge pull request #3513 from ReinUsesLisp/native-astc
...
video_core: Use native ASTC when available
2020-04-06 09:21:11 -04:00
namkazy
2c98e14d13
shader_decode: SULD.D using std::pair instead of out parameter
2020-04-06 13:46:55 +07:00
namkazy
9efa51311f
shader_decode: SULD.D avoid duplicate code block.
2020-04-06 13:34:06 +07:00
namkazy
7f5696513f
shader_decode: SULD.D fix conversion error.
2020-04-06 13:26:58 +07:00
namkazy
2906372ba1
shader_decode: SULD.D implement bits64 and reverse shader ir init method to removed shader stage.
2020-04-06 13:09:19 +07:00
ReinUsesLisp
3185245845
shader/memory: Implement RED.E.ADD
...
Implements a reduction operation. It's an atomic operation that doesn't
return a value.
This commit introduces another primitive because some shading languages
might have a primitive for reduction operations.
2020-04-06 02:24:47 -03:00
ReinUsesLisp
fd0a2b5151
shader/memory: Add "using std::move"
2020-04-06 02:18:14 -03:00
ReinUsesLisp
79970c9174
shader/memory: Minor fixes in ATOM
2020-04-06 00:54:22 -03:00
Fernando Sahmkow
69277de29d
Merge pull request #3592 from ReinUsesLisp/ipa
...
shader_decompiler: Remove FragCoord.w hack and change IPA implementation
2020-04-05 19:29:40 -04:00
Fernando Sahmkow
1633fbf99a
Merge pull request #3589 from ReinUsesLisp/fix-clears
...
gl_rasterizer: Mark cleared textures as dirty
2020-04-05 19:29:26 -04:00
namkazy
730f9b55b3
silent warning (conversion error)
2020-04-05 16:02:07 +07:00
namkazy
9f6ebccf06
shader_decode: SULD.D -> SINT actually same as UNORM.
2020-04-05 15:18:42 +07:00
namkazy
6f2b7087c2
shader_decode: SULD.D fix decode SNORM component
2020-04-05 14:46:43 +07:00
namkazy
69657ff19c
clang-format
2020-04-05 12:57:50 +07:00
namkazy
24cc64c5b3
shader_decode: get sampler descriptor from registry.
2020-04-05 12:54:48 +07:00
namkazy
acd3f0ab37
tweaking.
2020-04-05 10:31:32 +07:00
Nguyen Dac Nam
8370188b3c
clang-format
2020-04-05 10:31:31 +07:00
namkazy
3e3afa9be6
cleanup unuse params
2020-04-05 10:31:31 +07:00
namkazy
5cd5857000
cleanup debug code.
2020-04-05 10:31:30 +07:00
namkazy
658112783d
reimplement get component type, uncomment mistaken code
2020-04-05 10:31:30 +07:00
namkazy
3ad06e9b2b
remove disable optimize
2020-04-05 10:31:30 +07:00
namkazy
f24c2e1103
[wip] reimplement SULD.D
2020-04-05 10:31:29 +07:00
namkazy
58bcb86af5
add shader stage when init shader ir
2020-04-05 10:31:29 +07:00
Nguyen Dac Nam
2cefdd92bd
clang-fix
2020-04-05 10:31:28 +07:00
Nguyen Dac Nam
1f3d142875
shader: image - import PredCondition
2020-04-05 10:31:27 +07:00
Nguyen Dac Nam
08db60392d
shader: SULD.D bits32 implement more complexer method.
2020-04-05 10:31:27 +07:00
Nguyen Dac Nam
ed1d8beb13
shader: SULD.D import StoreType
2020-04-05 10:31:26 +07:00
Nguyen Dac Nam
6d235b8631
shader: implement SULD.D bits32
2020-04-05 10:31:26 +07:00
ReinUsesLisp
60106531b4
shader/other: Add error message for some S2R registers
2020-04-04 03:46:07 -03:00
ReinUsesLisp
8b719e9e1d
shader_bytecode: Rename MOV_SYS to S2R
2020-04-04 03:37:51 -03:00
ReinUsesLisp
9d15feb892
shader_bytecode: Add encoding for BAR
2020-04-04 03:36:21 -03:00
ReinUsesLisp
16ae98dbb3
shader_ir: Add error message for EXIT.FCSM_TR
2020-04-04 03:34:08 -03:00
ReinUsesLisp
c02a2dc24a
shader_bytecode: Add encoding for VOTE.VTG
2020-04-04 03:28:11 -03:00
ReinUsesLisp
80c4fee4ec
Revert "Merge pull request #3499 from ReinUsesLisp/depth-2d-array"
...
This reverts commit 41905ee467
, reversing
changes made to 35145bd529
.
It causes regressions in several games.
2020-04-04 00:02:26 -03:00
ReinUsesLisp
e1bd89e1c2
shader/memory: Silence no return value warning
...
Silences a warning about control paths not all returning a value.
2020-04-02 03:34:27 -03:00
Rodrigo Locatti
825a6e2615
Merge pull request #3552 from jroweboy/single-context
...
Refactor Context management (Fixes renderdoc on opengl issues)
2020-04-02 01:38:25 -03:00
ReinUsesLisp
2339fe199f
shader_decompiler: Remove FragCoord.w hack and change IPA implementation
...
Credits go to gdkchan and Ryujinx. The pull request used for this can
be found here: https://github.com/Ryujinx/Ryujinx/pull/1082
yuzu was already using the header for interpolation, but it was missing
the FragCoord.w multiplication described in the linked pull request.
This commit finally removes the FragCoord.w == 1.0f hack from the shader
decompiler.
While we are at it, this commit renames some enumerations to match
Nvidia's documentation (linked below) and fixes component declaration
order in the shader program header (z and w were swapped).
https://github.com/NVIDIA/open-gpu-doc/blob/master/Shader-Program-Header/Shader-Program-Header.html
2020-04-01 21:48:55 -03:00
ReinUsesLisp
dd1232755b
gl_texture_cache: Fix software ASTC fallback
2020-04-01 01:44:15 -03:00
ReinUsesLisp
2f0da10dc3
vk_device: Add missing ASTC queries
2020-04-01 01:14:04 -03:00
ReinUsesLisp
b6571ca9f0
video_core: Use native ASTC when available
2020-04-01 01:14:04 -03:00
ReinUsesLisp
16270dcfe4
gl_device: Detect if ASTC is reported and expose it
2020-04-01 01:14:04 -03:00
Rodrigo Locatti
baf91c920c
Merge pull request #3591 from ReinUsesLisp/vk-wrapper-part2
...
renderer_vulkan/wrapper: Add a Vulkan wrapper (part 2 of 2)
2020-03-31 22:14:26 -03:00
ReinUsesLisp
f22f6b72c3
renderer_vulkan/wrapper: Add vkEnumerateInstanceExtensionProperties wrapper
2020-03-31 21:32:08 -03:00
ReinUsesLisp
27dd542c60
renderer_vulkan/wrapper: Add command buffer handle
2020-03-31 21:32:08 -03:00
ReinUsesLisp
5c90d060d8
renderer_vulkan/wrapper: Add physical device handle
2020-03-31 21:32:08 -03:00
ReinUsesLisp
0eb37de98f
renderer_vulkan/wrapper: Add device handle
2020-03-31 21:32:08 -03:00
ReinUsesLisp
11774308d3
renderer_vulkan/wrapper: Add swapchain handle
2020-03-31 21:32:07 -03:00
ReinUsesLisp
7fe52ef77f
renderer_vulkan/wrapper: Add fence handle
2020-03-31 21:32:07 -03:00
ReinUsesLisp
3a63ae0658
renderer_vulkan/wrapper: Add device memory handle
2020-03-31 21:32:07 -03:00
ReinUsesLisp
397f53dea1
renderer_vulkan/wrapper: Add pool handles
2020-03-31 21:32:07 -03:00
ReinUsesLisp
affee77b70
renderer_vulkan/wrapper: Add buffer and image handles
2020-03-31 21:32:07 -03:00
ReinUsesLisp
d85ca0ab33
renderer_vulkan/wrapper: Add queue handle
2020-03-31 21:32:07 -03:00
ReinUsesLisp
151ddcf419
renderer_vulkan/wrapper: Add instance handle
2020-03-31 21:32:07 -03:00
Fernando Sahmkow
b03c0536ce
Merge pull request #3561 from ReinUsesLisp/f2f-conversion
...
shader/conversion: Fix F2F rounding operations with different sizes
2020-03-31 14:45:02 -04:00
Fernando Sahmkow
5b95a01463
Merge pull request #3577 from ReinUsesLisp/lea
...
shader/lea: Fix LEA implementation
2020-03-31 14:36:07 -04:00
ReinUsesLisp
1c5e2b60a7
gl_rasterizer: Mark cleared textures as dirty
...
Fixes a potential edge case where cleared textures read from the CPU
were not flushed.
2020-03-31 05:51:56 -03:00
Rodrigo Locatti
c19425ed69
Merge pull request #3506 from namkazt/patch-9
...
shader_decode: Implement partial ATOM/ATOMS instr
2020-03-31 00:56:28 -03:00
Nguyen Dac Nam
238c35b2c9
clang-format
2020-03-31 08:08:06 +07:00
Nguyen Dac Nam
defb9642da
shader_decode: fix by suggestion
2020-03-31 08:02:44 +07:00
Rodrigo Locatti
69728e8ad5
Merge pull request #3566 from ReinUsesLisp/vk-wrapper-part1
...
renderer_vulkan/wrapper: Add a Vulkan wrapper (part 1 of 2)
2020-03-30 21:57:36 -03:00
bunnei
4c72190a06
Merge pull request #3560 from ReinUsesLisp/fix-stencil
...
gl_rasterizer: Synchronize stencil testing on clears
2020-03-30 17:03:07 -04:00
namkazy
cb0a4151f8
clang-format
2020-03-30 20:46:21 +07:00
namkazy
c2665ec9c2
gl_decompiler: min/max op not implement yet
2020-03-30 18:48:22 +07:00
namkazy
4f7bea403a
shader_decode: ATOM/ATOMS: add function to avoid code repetition
2020-03-30 18:47:50 +07:00
namkazy
c8f6d9effd
shader_decode: merge GlobalAtomicOp to AtomicOp
2020-03-30 18:47:00 +07:00
Nguyen Dac Nam
972485ff18
shader_decode: implement ATOM operation for S32 and U32
2020-03-30 17:44:48 +07:00
namkazy
93cac0d294
clang-format
2020-03-30 17:44:48 +07:00
Nguyen Dac Nam
3dc09a6250
shader_decode: implement ATOMS instr partial.
2020-03-30 17:44:46 +07:00
Nguyen Dac Nam
a2cc80b605
vk_decompiler: add atomic op and handler function.
2020-03-30 17:44:45 +07:00
Nguyen Dac Nam
552f0ff267
gl_decompiler: add atomic op
2020-03-30 17:44:45 +07:00
Nguyen Dac Nam
2c780db5b9
shader: node - update correct comment
2020-03-30 17:44:44 +07:00
Nguyen Dac Nam
c119473c40
shader_decode: add Atomic op for common usage
2020-03-30 17:44:44 +07:00
ReinUsesLisp
08470d261d
shader_bytecode: Fix I2I_IMM encoding
2020-03-28 18:49:07 -03:00
ReinUsesLisp
b6c9fba81c
renderer_vulkan/wrapper: Address feedback
2020-03-28 04:09:02 -03:00
ReinUsesLisp
5300a918c6
shader/lea: Simplify generated LEA code
2020-03-28 03:55:04 -03:00
ReinUsesLisp
523a709bf1
shader/lea: Fix op_a and op_b usages
...
They were swapped.
2020-03-27 18:37:20 -03:00
ReinUsesLisp
796b3319e6
shader/lea: Remove const and use move when possible
2020-03-27 18:36:38 -03:00
Fernando Sahmkow
7a2f60df26
Merge pull request #3565 from ReinUsesLisp/image-format
...
engines/const_buffer_engine_interface: Store image format and types
2020-03-27 14:08:54 -04:00
ReinUsesLisp
2694552b7f
renderer_vulkan/wrapper: Add owning handles
2020-03-27 03:21:04 -03:00
ReinUsesLisp
7413b30923
renderer_vulkan/wrapper: Add pool allocations owning templated class
2020-03-27 03:21:04 -03:00
ReinUsesLisp
d8d392b39a
renderer_vulkan/wrapper: Add owning handle templated class
2020-03-27 03:21:04 -03:00
ReinUsesLisp
60f351084a
renderer_vulkan/wrapper: Add destroy and free overload set
2020-03-27 03:21:04 -03:00
ReinUsesLisp
a9e4528d10
renderer_vulkan/wrapper: Add dispatch table and loaders
2020-03-27 03:21:04 -03:00
ReinUsesLisp
3f0b7673f0
renderer_vulkan/wrapper: Add exception class
2020-03-27 03:21:04 -03:00
ReinUsesLisp
f5cee0e885
renderer_vulkan/wrapper: Add ToString function for VkResult
2020-03-27 03:21:03 -03:00
ReinUsesLisp
92c8d783b3
renderer_vulkan/wrapper: Add Vulakn wrapper and a span helper
...
The intention behind a Vulkan wrapper is to drop Vulkan-Hpp.
The issues with Vulkan-Hpp are:
- Regular breaks of the API.
- Copy constructors that do the same as the aggregates (fixed recently)
- External dynamic dispatch that is hard to remove
- Alias KHR handles with non-KHR handles making it impossible to use
smart handles on Vulkan 1.0 instances with extensions that were included
on Vulkan 1.1.
- Dynamic dispatchers silently change size depending on preprocessor
definitions. Different files will have different dispatch definitions,
generating all kinds of hard to debug memory issues.
In other words, Vulkan-Hpp is not "production ready" for our needs and
this wrapper aims to replace it without losing RAII and exception
safety.
2020-03-27 03:13:18 -03:00
ReinUsesLisp
cedbe925cd
engines/const_buffer_engine_interface: Store image format type
...
This information is required to properly implement SULD.B. It might also
be handy for all image operations, since it would allow us to implement
them on devices that require the image format to be specified (on
desktop, this would be AMD on OpenGL and Intel on OpenGL and Vulkan).
2020-03-27 00:36:22 -03:00
Dan
744b207d92
maxwell_to_vk: implement signedscaled vertex formats
2020-03-27 00:14:19 +01:00
James Rowe
cf9c94d401
Address review and fix broken yuzu-tester build
2020-03-25 23:32:42 -06:00
ReinUsesLisp
46791c464a
shader/conversion: Fix F2F rounding operations with different sizes
...
Rounding operations only matter when the conversion size of source and
destination is the same, i.e. .F16.F16, .F32.F32 and .F64.F64.
When there is a mismatch (.F16.F32), these bits are used for IEEE
rounding, we don't emulate this because GLSL and SPIR-V don't support
configuring it per operation.
2020-03-26 01:58:49 -03:00
ReinUsesLisp
7617e88fb2
gl_rasterizer: Update stencil test regardless of it being disabled
2020-03-26 01:08:14 -03:00
ReinUsesLisp
c310cef615
gl_rasterizer: Synchronize stencil testing on clears
2020-03-26 00:51:47 -03:00
bunnei
23c7dda710
Merge pull request #3544 from makigumo/myfork/patch-2
...
xmad: fix clang build error
2020-03-25 19:29:16 -04:00
bunnei
e6aff11057
Merge pull request #3520 from ReinUsesLisp/legacy-varyings
...
gl_shader_decompiler: Implement legacy varyings
2020-03-25 19:27:51 -04:00
James Rowe
282adfc70b
Frontend/GPU: Refactor context management
...
Changes the GraphicsContext to be managed by the GPU core. This
eliminates the need for the frontends to fool around with tricky
MakeCurrent/DoneCurrent calls that are dependent on the settings (such
as async gpu option).
This also refactors out the need to use QWidget::fromWindowContainer as
that caused issues with focus and input handling. Now we use a regular
QWidget and just access the native windowHandle() directly.
Another change is removing the debug tool setting in FrameMailbox.
Instead of trying to block the frontend until a new frame is ready, the
core will now take over presentation and draw directly to the window if
the renderer detects that its hooked by NSight or RenderDoc
Lastly, since it was in the way, I removed ScopeAcquireWindowContext and
replaced it with a simple subclass in GraphicsContext that achieves the
same result
2020-03-24 21:03:42 -06:00
Fernando Sahmkow
497f593525
Merge pull request #3543 from ReinUsesLisp/gl-depth-range
...
gl_rasterizer: Use transformed viewport for depth ranges
2020-03-23 12:00:21 -04:00
makigumo
5a5c6d4ed8
xmad: fix clang build error
2020-03-23 00:09:31 +01:00
namkazy
fc37672f26
apply replay logic to all writes. remove replay from MacroInterpreter::Send (@fincs)
2020-03-22 22:25:44 +07:00
namkazy
f66743cd0c
maxwell_3d: change declaration order
2020-03-22 13:41:16 +07:00
namkazy
d4e93cf38c
maxwell_3d: init shadow_state
2020-03-22 13:35:11 +07:00
ReinUsesLisp
bdcedc8506
gl_rasterizer: Use transformed viewport for depth ranges
...
Implement depth ranges using the transformed viewport instead of the
generic one. This matches the current Vulkan implementation but doesn't
support negative depth ranges. An update to glad is required for this.
2020-03-22 03:26:07 -03:00
namkazy
22f4268c2f
maxwell_3d: this seem more correct.
2020-03-22 12:02:54 +07:00
namkazy
7051dc1902
maxwell_3d: update comments for shadow ram usage
2020-03-22 11:35:26 +07:00
Nguyen Dac Nam
01af036c1f
marco_interpreter: write hw value when shadow ram requested
2020-03-22 10:53:41 +07:00
Nguyen Dac Nam
63c2635e6f
maxwell_3d: track shadow ram ctrl and hw reg value
2020-03-22 10:53:41 +07:00
Nguyen Dac Nam
dbfbe352e0
maxwell_3d: implement MME shadow RAM
2020-03-22 10:53:35 +07:00
bunnei
bdddbe2daa
Merge pull request #3505 from namkazt/patch-8
...
shader_decode: implement XMAD mode CSfu
2020-03-19 17:41:01 -04:00
ReinUsesLisp
38c1e77f01
vk_texture_cache: Silence misc warnings
2020-03-18 20:03:19 -03:00
ReinUsesLisp
b6b2e31e5e
vk_staging_buffer_pool: Silence unused constant warning
2020-03-18 20:03:19 -03:00
ReinUsesLisp
fc51ece7bf
vk_rasterizer: Remove unused variable
2020-03-18 20:03:19 -03:00
ReinUsesLisp
98d85cdc20
vk_pipeline_cache: Remove unused variable
2020-03-18 20:03:19 -03:00
ReinUsesLisp
dab450ec46
maxwell_to_vk: Sielence -Wswitch warning
2020-03-18 20:03:19 -03:00
ReinUsesLisp
351816ac38
gl_shader_decompiler: Remove deprecated function and its usages
2020-03-18 20:03:19 -03:00
ReinUsesLisp
acf328a71f
gl_rasterizer: Silence misc warnings
2020-03-18 20:03:19 -03:00
ReinUsesLisp
9f46066bda
kepler_compute: Remove unused variables
2020-03-18 20:03:19 -03:00
ReinUsesLisp
664fa4ea06
astc: Fix clang build issues
2020-03-18 04:30:25 -03:00
ReinUsesLisp
f5658a9fda
gl_shader_decompiler: Don't redeclare gl_VertexID and gl_InstanceID
2020-03-18 01:28:41 -03:00
Mat M
edb9cccb36
Merge pull request #3510 from FernandoS27/dirty-write
...
DirtyFlags: relax need to set render_targets as dirty
2020-03-17 17:29:22 -04:00
Mat M
f54d2d3114
Merge pull request #3509 from ReinUsesLisp/astc-opts
...
astc: General changes and optimizations
2020-03-17 17:28:49 -04:00
Mat M
d787856621
Merge pull request #3518 from ReinUsesLisp/scissor-clears
...
vk_rasterizer: Implement scissor clears and layered clears
2020-03-17 17:27:15 -04:00
Mat M
9fdfd58f9f
Merge pull request #3519 from ReinUsesLisp/int-formats
...
maxwell_to_vk: Implement RG32 and RGB32 integer vertex formats
2020-03-17 17:26:16 -04:00
bunnei
1c45c8086e
Merge pull request #3498 from ReinUsesLisp/texel-fetch-glsl
...
gl_shader_decompiler: Add layer component to texelFetch
2020-03-17 10:53:38 -04:00
ReinUsesLisp
53d673a7d3
renderer_opengl: Move some logic to an anonymous namespace
2020-03-16 04:03:34 -03:00
ReinUsesLisp
311d2fc768
renderer_opengl: Detect Nvidia Nsight as a debugging tool
...
Use getenv to detect Nsight.
2020-03-16 03:59:08 -03:00
Rodrigo Locatti
b16c8e0e8d
Merge pull request #3515 from ReinUsesLisp/vertex-vk-assert
...
vk_rasterizer: Fix vertex range assert
2020-03-15 21:26:54 -03:00
Rodrigo Locatti
7cc46a6faa
Merge pull request #3501 from ReinUsesLisp/rgba16-snorm
...
video_core: Implement RGBA16_SNORM
2020-03-15 21:24:53 -03:00
Rodrigo Locatti
ddafc99776
Merge pull request #3502 from namkazt/patch-3
...
shader_decode: Reimplement BFE instructions
2020-03-15 21:23:04 -03:00
Rodrigo Locatti
d64edf21bb
Merge pull request #3503 from makigumo/patch-2
...
maxwell_to_vk: add vertex format eA2B10G10R10UnormPack32
2020-03-15 21:21:38 -03:00
ReinUsesLisp
5afc397d52
gl_shader_decompiler: Implement legacy varyings
...
Legacy varyings are special attributes carried over in hardware from
the OpenGL 1 and OpenGL 2 days. These were generally used instead of the
generic attributes we use today. They are deprecated or removed from
most APIs, but Nvidia still ships them in hardware.
To implement these, this commit maps them 1:1 to OpenGL compatibility.
2020-03-15 21:03:59 -03:00
ReinUsesLisp
6442e02c5d
shader/shader_ir: Track usage in input attribute and of legacy varyings
2020-03-15 21:01:52 -03:00
ReinUsesLisp
8e6e55d6f8
shader/shader_ir: Fix clip distance usage stores
2020-03-15 20:53:14 -03:00
ReinUsesLisp
464bd5fad7
shader/shader_ir: Change declare output attribute to a switch
2020-03-15 20:49:35 -03:00
Rodrigo Locatti
86b1f15d9a
Merge pull request #3512 from bunnei/fix-renderdoc
...
renderer_opengl: Keep frames synchronized when using a GPU debugger.
2020-03-15 19:28:43 -03:00
ReinUsesLisp
52acb7f9a0
maxwell_to_vk: Implement RG32 and RGB32 integer vertex formats
2020-03-15 18:51:49 -03:00
ReinUsesLisp
71cc772988
vk_rasterizer: Implement layered clears
2020-03-15 18:37:19 -03:00
makigumo
f91046bf8d
vk_shader_decompiler: fix linux build
2020-03-15 18:00:14 +01:00
ReinUsesLisp
a7131af7d6
vk_rasterizer: Fix vertex range assert
...
End can be equal to start in CalculateVertexArraysSize. This is quite
common when the vertex size is zero.
2020-03-15 04:04:17 -03:00
ReinUsesLisp
8baf98e439
vk_rasterizer: Reimplement clears with vkCmdClearAttachments
2020-03-15 03:40:41 -03:00
bunnei
c5afe93dcc
renderer_opengl: Keep presentation frames in lock-step when GPU debugging.
...
- Fixes renderdoc with OpenGL renderer.
2020-03-14 17:45:01 -04:00
bunnei
4373fa8042
gl_device: Add option to check GL_EXT_debug_tool.
2020-03-14 17:39:29 -04:00
bunnei
4dfd5c84ea
Merge pull request #3508 from FernandoS27/page-table
...
PageTable: move backing addresses to a children class as the CPU page table does not need them.
2020-03-14 16:50:27 -04:00
Fernando Sahmkow
380fc8d2e1
DirtyFlags: relax need to set render_targets as dirty
...
The texture cache already takes care of setting a render target to dirty
when invalidated.
2020-03-14 11:47:33 -04:00
Fernando Sahmkow
c51dbf8038
Merge pull request #3500 from ReinUsesLisp/incompatible-types
...
texture_cache: Report incompatible textures as black
2020-03-14 09:49:05 -04:00
Fernando Sahmkow
41905ee467
Merge pull request #3499 from ReinUsesLisp/depth-2d-array
...
texture_cache/surface_params: Force depth=1 on 2D textures
2020-03-14 09:48:39 -04:00
Fernando Sahmkow
27cbb75e7c
PageTable: move backing addresses to a children class as the CPU page table does not need them.
...
This PR aims to reduce the memory usage in the CPU page table by moving
GPU specific parameters into a child class. This saves 1Gb of Memory for
most games.
2020-03-14 09:43:57 -04:00
ReinUsesLisp
42cb8f1124
astc: Fix typos from search and replace
2020-03-14 01:05:20 -03:00
ReinUsesLisp
9b8fb3c756
astc: Minor changes to InputBitStream
2020-03-14 00:45:54 -03:00
ReinUsesLisp
d71d7d917e
astc: Pass val in Replicate by copy
2020-03-14 00:13:58 -03:00
ReinUsesLisp
134f3ff9b4
astc: Call std::vector:reserve on decodedClolorValues to avoid reallocating
2020-03-14 00:09:56 -03:00
Nguyen Dac Nam
3287b1247d
clang-format
2020-03-14 10:07:40 +07:00
Nguyen Dac Nam
240d45830d
nit
2020-03-14 09:57:24 +07:00
ReinUsesLisp
3377b78ea7
astc: Call std::vector::reserve on texelWeightValues to avoid reallocating
2020-03-13 23:52:51 -03:00
ReinUsesLisp
801fd04f75
astc: Create a LUT at compile time for encoding values
2020-03-13 23:40:02 -03:00
ReinUsesLisp
e183820956
astc: Make IntegerEncodedValue a trivial structure
2020-03-13 22:49:28 -03:00
ReinUsesLisp
70a31eda62
astc: Make IntegerEncodedValue constructor constexpr
2020-03-13 22:36:45 -03:00
ReinUsesLisp
5ed377b989
astc: Make IntegerEncodedValue trivially copyable
2020-03-13 22:30:31 -03:00
ReinUsesLisp
e7d97605e8
astc: Rename C types to common_types
2020-03-13 22:28:51 -03:00
ReinUsesLisp
835a3d09c6
astc: Move Popcnt to an anonymous namespace and make it constexpr
2020-03-13 22:26:48 -03:00
ReinUsesLisp
731a9a322e
astc: Use common types instead of stdint.h integer types
2020-03-13 22:22:27 -03:00
ReinUsesLisp
d3dc4e399c
astc: Use 'enum class' instead of 'enum' for EIntegerEncoding
2020-03-13 22:20:12 -03:00
ReinUsesLisp
69c7a01f88
vk/gl_shader_decompiler: Silence assertion on compute
2020-03-13 18:33:05 -03:00
ReinUsesLisp
62560f1e63
vk_shader_decompiler: Fix default varying regression
2020-03-13 18:33:05 -03:00
ReinUsesLisp
afebdda203
maxwell_3d: Add padding words to XFB entries
...
Use INSERT_UNION_PADDING_WORDS instead of alignas to ensure a size
requirement.
2020-03-13 18:33:05 -03:00
ReinUsesLisp
4bc4851d45
gl_shader_decompiler: Fix implicit conversion errors
2020-03-13 18:33:05 -03:00
Rodrigo Locatti
47459f6a36
vk_shader_decompiler: Fix implicit type conversion
...
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-03-13 18:33:05 -03:00
ReinUsesLisp
2fae1e6205
vk_rasterizer: Implement transform feedback binding zero
2020-03-13 18:33:05 -03:00
ReinUsesLisp
b67360c0f8
vk_shader_decompiler: Add XFB decorations to generic varyings
2020-03-13 18:33:05 -03:00
ReinUsesLisp
8d5bdcb17b
vk_device: Enable VK_EXT_transform_feedback when available
2020-03-13 18:33:05 -03:00
ReinUsesLisp
c320702092
vk_device: Shrink formatless capability name size
2020-03-13 18:33:05 -03:00
ReinUsesLisp
ae6189d7c2
shader/transform_feedback: Expose buffer stride
2020-03-13 18:33:05 -03:00
ReinUsesLisp
7acebd7eb6
vk_shader_decompiler: Use registry for specialization
2020-03-13 18:33:05 -03:00
ReinUsesLisp
8e9f23f393
gl_rasterizer: Implement transform feedback bindings
2020-03-13 18:33:04 -03:00
ReinUsesLisp
4d711dface
gl_shader_decompiler: Decorate output attributes with XFB layout
...
We sometimes have to slice attributes in different parts. This is needed
for example in instances where the game feedbacks 3 components but
writes 4 from the shader (something that is possible with
GL_NV_transform_feedback).
2020-03-13 18:33:04 -03:00
ReinUsesLisp
3dcaa84ba4
shader/transform_feedback: Add host API friendly TFB builder
2020-03-13 18:33:04 -03:00
Rodrigo Locatti
244fe13219
Merge branch 'master' into shader-purge
2020-03-13 16:44:06 -03:00
bunnei
b30b1f741d
Merge pull request #3491 from ReinUsesLisp/polygon-modes
...
gl_rasterizer: Implement polygon modes and fill rectangles
2020-03-13 10:08:57 -04:00
Nguyen Dac Nam
829f424618
nit & remove some optional param
2020-03-13 20:47:38 +07:00
Nguyen Dac Nam
a166217480
shader_decode: implement XMAD mode CSfu
2020-03-13 19:01:49 +07:00
makigumo
753bc2026f
fix formatting
2020-03-13 11:37:24 +01:00
makigumo
54681909be
maxwell_to_vk: add vertex format eA2B10G10R10UnormPack32
2020-03-13 11:26:13 +01:00
Nguyen Dac Nam
00607fe1e0
clang-format
2020-03-13 15:38:57 +07:00
Nguyen Dac Nam
325977c0c6
Apply suggestions from code review
...
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-03-13 15:35:15 +07:00
Nguyen Dac Nam
70ff82f72d
shader_decode: BFE add ref of reverse parallel method.
2020-03-13 14:20:18 +07:00
Nguyen Dac Nam
96a4abe12d
shader_decode: implement BREV on BFE
...
Implement reverse parallel follow: https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel
2020-03-13 14:13:31 +07:00
Nguyen Dac Nam
93547cac68
shader_bytecode: update BFE instructions struct.
2020-03-13 12:52:16 +07:00
Nguyen Dac Nam
911c56ccef
node_helper: add IBitfieldExtract case
2020-03-13 12:50:32 +07:00
Nguyen Dac Nam
465ba30d08
shader_decode: Reimplement BFE instructions
2020-03-13 12:48:01 +07:00
ReinUsesLisp
e24197bb3f
gl_shader_decompiler: Initialize gl_Position on vertex shaders
2020-03-12 23:31:06 -03:00
Fernando Sahmkow
00e9ba0603
Merge pull request #3483 from namkazt/patch-1
...
vk_rasterizer: fix mistype on SetupGraphicsImages
2020-03-12 22:10:48 -04:00
Fernando Sahmkow
f159a12820
Merge pull request #3480 from ReinUsesLisp/vk-disabled-ubo
...
vk_rasterizer: Support disabled uniform buffers
2020-03-12 22:09:49 -04:00
ReinUsesLisp
3a10016e38
gl_shader_decompiler: Add missing {} on smem GLSL emission
2020-03-12 21:50:37 -03:00
ReinUsesLisp
4dcca90ef4
video_core: Implement RGBA16_SNORM
...
Implement RGBA16_SNORM with the current API. Nothing special here.
2020-03-12 21:42:33 -03:00
ReinUsesLisp
e22816a5bb
texture_cache: Report incompatible textures as black
...
Some games bind incompatible texture types to certain types.
For example Astral Chain binds a 2D texture with 1 layer (non-array) to
a cubemap slot (that's how it's used in the shader). After testing this
in hardware, the expected "undefined behavior" is to report all pixels
as black.
We already have a path for reporting black textures in the texture
cache. When textures types are incompatible, this commit binds these
kind of textures. This is done on the API agnostic texture cache so no
extra code has to be inserted on OpenGL or Vulkan.
As a side effect, this fixes invalidations of ASTC textures on Astral
Chain. This happened because yuzu detected a cube texture and forced
6 faces, generating a texture larger than what the TIC reported.
2020-03-12 18:22:05 -03:00
ReinUsesLisp
daae6a323b
texture_cache/surface_params: Force depth=1 on 2D textures
...
Sometimes games will sample a 2D array TIC with a 2D access in the
shader. This causes bad interactions with the rest of the texture cache.
To emulate what the game wants to do, force a depth=1 on 2D textures
(not 2D arrays) and let the texture cache handle the rest.
2020-03-12 18:11:42 -03:00
ReinUsesLisp
38fe070d78
gl_shader_decompiler: Add layer component to texelFetch
...
TexelFetch was not emitting the array component generating invalid GLSL.
2020-03-12 18:10:29 -03:00
ReinUsesLisp
825d629565
gl_shader_decompiler: Fix regression in render target declarations
...
A previous commit introduced a way to declare as few render targets as
possible. Turns out this introduced a regression in some games.
2020-03-12 05:01:20 -03:00
ReinUsesLisp
8357908099
gl_shader_manager: Fix interaction between graphics and compute
...
After a compute shader was set to the pipeline, no graphics shader was
invoked again. To address this use glUseProgram to bind compute shaders
(without state tracking) and call glUseProgram(0) when transitioning out
of it back to the graphics pipeline.
2020-03-11 01:04:52 -03:00
ReinUsesLisp
e4bc3c3342
gl_rasterizer: Implement polygon modes and fill rectangles
2020-03-09 20:39:58 -03:00
ReinUsesLisp
eb5861e0a2
engines/maxwell_3d: Add TFB registers and store them in shader registry
2020-03-09 18:40:53 -03:00
ReinUsesLisp
b1acb4f73f
shader/registry: Address feedback
2020-03-09 18:40:53 -03:00
ReinUsesLisp
b1061afed9
gl_shader_decompiler: Add identifier to decompiled code
2020-03-09 18:40:53 -03:00
ReinUsesLisp
e612242977
gl_shader_decompiler: Roll back to GLSL core 430
...
RenderDoc won't build shaders if we use GLSL compatibility.
2020-03-09 18:40:53 -03:00
ReinUsesLisp
978172530e
const_buffer_engine_interface: Store component types
...
This is required for Vulkan. Sampling integer textures with float
handles is illegal.
2020-03-09 18:40:53 -03:00
ReinUsesLisp
120f688272
yuzu/loading_screen: Remove unused shader progress mode
2020-03-09 18:40:53 -03:00
ReinUsesLisp
e1932351a9
gl_shader_cache: Reduce registry consistency to debug assert
...
Registry consistency is something that practically can't happen and it
has a measurable runtime cost. Reduce it to a DEBUG_ASSERT.
2020-03-09 18:40:07 -03:00
ReinUsesLisp
66a8a3e887
shader/registry: Cache tessellation state
2020-03-09 18:40:07 -03:00
ReinUsesLisp
0528be5c92
shader/registry: Store graphics and compute metadata
...
Store information GLSL forces us to provide but it's dynamic state in
hardware (workgroup sizes, primitive topology, shared memory size).
2020-03-09 18:40:07 -03:00
ReinUsesLisp
e8efd5a901
video_core: Rename "const buffer locker" to "registry"
2020-03-09 18:40:06 -03:00
ReinUsesLisp
bd8b9bbcee
gl_shader_cache: Rework shader cache and remove post-specializations
...
Instead of pre-specializing shaders and then post-specializing them,
drop the later and only "specialize" the shader while decoding it.
2020-03-09 18:40:06 -03:00
Rodrigo Locatti
22e825a3bc
Merge pull request #3301 from ReinUsesLisp/state-tracker
...
video_core: Remove gl_state and use a state tracker based on dirty flags
2020-03-09 18:34:37 -03:00
ReinUsesLisp
1aa75b1081
textures: Fix anisotropy hack
...
Previous code could generate an anisotropy value way higher than x16.
2020-03-08 15:59:38 -03:00
bunnei
84e9f9f395
Merge pull request #3452 from Morph1984/anisotropic-filtering
...
frontend/Graphics: Add "Advanced" graphics tab and experimental Anisotropic Filtering support
2020-03-07 22:28:35 -05:00
Nguyen Dac Nam
16cfbb068c
vk_reasterizer: fix mistype on SetupGraphicsImages
...
This should use Maxwell3D engine. Fixed some GPU error on Kirby and maybe other games.
2020-03-08 10:06:59 +07:00
bunnei
662feb8c1c
Merge pull request #3481 from ReinUsesLisp/abgr5-storage
...
maxwell_to_vk: Remove Storage capability for A1B5G5R5U
2020-03-07 19:51:33 -05:00
ReinUsesLisp
e4f9ce0379
vk_rasterizer: Support disabled uniform buffers
2020-03-06 18:47:51 -03:00
ReinUsesLisp
aa6fe3f1aa
maxwell_to_vk: Remove Storage capability for A1B5G5R5U
2020-03-06 18:47:27 -03:00
bunnei
49eff536d0
Merge pull request #3463 from ReinUsesLisp/vk-toctou
...
vk_swapchain: Silence TOCTOU race condition
2020-03-05 19:38:42 -05:00
bunnei
0361aa1915
Merge pull request #3451 from ReinUsesLisp/indexed-textures
...
vk_shader_decompiler: Implement indexed textures
2020-03-05 11:42:46 -05:00
bunnei
fa1d625eed
Merge pull request #3469 from namkazt/patch-1
...
shader_decode: Fix LD, LDG when track constant buffer
2020-03-04 23:10:01 -05:00
bunnei
67e7186d79
Merge pull request #3455 from ReinUsesLisp/attr-scaled
...
video_core: Implement more scaled attribute formats
2020-03-03 22:46:20 -05:00
Nguyen Dac Nam
85a4222a8c
nit: move comment to right place.
2020-02-29 13:50:10 +07:00
ReinUsesLisp
735c003a70
video_core/dirty_flags: Address feedback
2020-02-28 17:56:43 -03:00
ReinUsesLisp
ef7f6eb67d
renderer_opengl: Fix edge-case where alpha testing might cull presentation
2020-02-28 17:56:43 -03:00
ReinUsesLisp
a6a350ddc3
gl_texture_cache: Remove blending disable on blits
...
Blending doesn't affect blits. Rasterizer discard does, update the
commentaries.
2020-02-28 17:56:43 -03:00
ReinUsesLisp
887d5288ef
gl_rasterizer: Don't disable blending on clears
...
Blending doesn't affect clears.
2020-02-28 17:56:43 -03:00
ReinUsesLisp
ac204754d4
dirty_flags: Deduplicate code between OpenGL and Vulkan
2020-02-28 17:56:43 -03:00
ReinUsesLisp
6669b359a3
vk_rasterizer: Pass Maxwell registers to dynamic updates
2020-02-28 17:56:43 -03:00
ReinUsesLisp
042256c6bb
state_tracker: Remove type traits with named structures
2020-02-28 17:56:43 -03:00
ReinUsesLisp
6ac3eb4d87
vk_state_tracker: Implement dirty flags for stencil properties
2020-02-28 17:56:43 -03:00
ReinUsesLisp
f9df2c6bcd
vk_state_tracker: Implement dirty flags for depth bounds
2020-02-28 17:56:43 -03:00
ReinUsesLisp
cd0e28c9ec
vk_state_tracker: Implement dirty flags for blend constants
2020-02-28 17:56:43 -03:00
ReinUsesLisp
a33870996b
vk_state_tracker: Implement dirty flags for depth bias
2020-02-28 17:56:43 -03:00
ReinUsesLisp
42f1874965
vk_state_tracker: Implement dirty flags for scissors
2020-02-28 17:56:43 -03:00
ReinUsesLisp
1bd95a314f
vk_state_tracker: Initial implementation
...
Add support for render targets and viewports.
2020-02-28 17:56:43 -03:00
ReinUsesLisp
b1498d2c54
gl_rasterizer: Remove num vertex buffers magic number
2020-02-28 17:56:43 -03:00
ReinUsesLisp
62437943a7
gl_rasterizer: Only apply polygon offset clamp if enabled
2020-02-28 17:56:43 -03:00
ReinUsesLisp
2eeea90713
gl_state_tracker: Implement dirty flags for depth clamp enabling
2020-02-28 17:56:43 -03:00
ReinUsesLisp
3ce66776ec
gl_rasterizer: Disable scissor 0 when scissor is not used on clear
2020-02-28 17:56:43 -03:00
ReinUsesLisp
35bb9239ca
gl_rasterizer: Notify depth mask changes on clear
2020-02-28 17:56:43 -03:00
ReinUsesLisp
98c8948b23
gl_rasterizer: Minor sort changes to clearing
2020-02-28 17:56:42 -03:00
ReinUsesLisp
15cadc3948
maxwell_3d: Use two tables instead of three for dirty flags
2020-02-28 17:56:42 -03:00
ReinUsesLisp
a5bfc0d045
gl_state_tracker: Track state of index buffers
2020-02-28 17:56:42 -03:00
ReinUsesLisp
a42a6e1a2c
gl_state_tracker: Implement dirty flags for clip control
2020-02-28 17:56:42 -03:00
ReinUsesLisp
4f8d152b18
gl_state_tracker: Implement dirty flags for point sizes
2020-02-28 17:56:42 -03:00
ReinUsesLisp
231601763c
gl_state_tracker: Implement dirty flags for fragment color clamp
2020-02-28 17:56:42 -03:00
ReinUsesLisp
bf1a1d989f
gl_state_tracker: Implement dirty flags for logic op
2020-02-28 17:56:42 -03:00
ReinUsesLisp
13afd0e5b0
gl_state_tracker: Implement dirty flags for sRGB
2020-02-28 17:56:42 -03:00
ReinUsesLisp
d8f5c45051
gl_state_tracker: Implement dirty flags for rasterize enable
2020-02-28 17:56:42 -03:00
ReinUsesLisp
b727d99441
gl_state_tracker: Implement dirty flags for multisample
2020-02-28 17:56:42 -03:00
ReinUsesLisp
3c22bd92d8
gl_state_tracker: Implement dirty flags for alpha testing
2020-02-28 17:56:42 -03:00
ReinUsesLisp
9e46953580
gl_state_tracker: Implement dirty flags for polygon offsets
2020-02-28 17:56:42 -03:00
ReinUsesLisp
46a1888e02
gl_state_tracker: Implement dirty flags for primitive restart
2020-02-28 17:56:42 -03:00
ReinUsesLisp
37536d7a49
gl_state_tracker: Implement dirty flags for stencil testing
2020-02-28 17:56:42 -03:00
ReinUsesLisp
40a2c57df5
gl_state_tracker: Implement depth dirty flags
2020-02-28 17:56:42 -03:00
ReinUsesLisp
b910a83a47
gl_state_tracker: Implement dirty flags for front face and culling
2020-02-28 17:56:42 -03:00
ReinUsesLisp
b01dd7d1c8
gl_state_tracker: Implement dirty flags for blending
2020-02-28 17:56:42 -03:00
ReinUsesLisp
f7ec078592
gl_state_tracker: Implement dirty flags for clip distances and shaders
2020-02-28 17:56:42 -03:00
ReinUsesLisp
758ad3f75d
gl_state_tracker: Add dirty flags for buffers and divisors
2020-02-28 17:56:42 -03:00
ReinUsesLisp
9b08698a0c
maxwell_3d: Change write dirty flags to a bitset
2020-02-28 17:56:42 -03:00
ReinUsesLisp
69ad6279e4
gl_state_tracker: Implement dirty flags for vertex formats
2020-02-28 17:56:42 -03:00
ReinUsesLisp
6530144ccb
gl_state_tracker: Implement dirty flags for color masks
2020-02-28 17:56:42 -03:00
ReinUsesLisp
ba6f390448
gl_state_tracker: Implement dirty flags for scissors
2020-02-28 17:56:42 -03:00
ReinUsesLisp
7f52efdf61
gl_state_tracker: Implement dirty flags for viewports
2020-02-28 17:56:41 -03:00
ReinUsesLisp
dacf83ac02
renderer_opengl: Reintroduce dirty flags for render targets
2020-02-28 17:56:41 -03:00
ReinUsesLisp
9e74e6988b
maxwell_3d: Flatten cull and front face registers
2020-02-28 17:56:41 -03:00
ReinUsesLisp
eed789d0d1
video_core: Reintroduce dirty flags infrastructure
2020-02-28 17:56:41 -03:00
ReinUsesLisp
b92dfcd7f2
gl_state: Remove completely
2020-02-28 17:56:35 -03:00
ReinUsesLisp
1c4bf9cbfa
gl_state: Remove program tracking
2020-02-28 17:52:14 -03:00
ReinUsesLisp
5ccb07933a
gl_state: Remove framebuffer tracking
2020-02-28 17:52:10 -03:00
ReinUsesLisp
17a7fa751b
gl_state: Remove image tracking
2020-02-28 17:36:40 -03:00
ReinUsesLisp
9677db03da
gl_state: Remove texture and sampler tracking
2020-02-28 17:35:58 -03:00
ReinUsesLisp
1bc0da3dea
gl_state: Remove blend state tracking
2020-02-28 17:34:43 -03:00
ReinUsesLisp
7d9a5e9e30
gl_state: Remove stencil test tracking
2020-02-28 17:32:05 -03:00
ReinUsesLisp
07a954e67f
gl_state: Remove clip control tracking
2020-02-28 17:31:57 -03:00
ReinUsesLisp
1eee891f6e
gl_state: Remove clip distances tracking
2020-02-28 17:26:26 -03:00
ReinUsesLisp
e8125af8dd
gl_state: Remove rasterizer disable tracking
2020-02-28 17:25:28 -03:00
ReinUsesLisp
d3e433a380
gl_state: Remove viewport and depth range tracking
2020-02-28 17:25:18 -03:00
ReinUsesLisp
7c16b3551b
gl_state: Remove scissor test tracking
2020-02-28 17:00:23 -03:00
ReinUsesLisp
0914c70b7f
gl_state: Remove color mask tracking
2020-02-28 16:59:17 -03:00
ReinUsesLisp
2392b548be
gl_state: Remove clamp framebuffer color tracking
...
This commit doesn't reset it for screen draws because clamping doesn't
change anything there.
2020-02-28 16:58:30 -03:00
ReinUsesLisp
f92236976b
gl_state: Remove multisample tracking
2020-02-28 16:57:47 -03:00
ReinUsesLisp
04d1134191
gl_state: Remove framebuffer sRGB tracking
2020-02-28 16:55:23 -03:00
ReinUsesLisp
d5ab0358b6
gl_state: Remove VAO cache and tracking
2020-02-28 16:54:37 -03:00
ReinUsesLisp
2a662fea36
gl_state: Remove depth clamp tracking
2020-02-28 16:53:35 -03:00
ReinUsesLisp
e1a16a52fa
gl_state: Remove depth tracking
2020-02-28 16:52:46 -03:00
ReinUsesLisp
0f343d32c4
gl_state: Remove primitive restart tracking
2020-02-28 16:51:45 -03:00
ReinUsesLisp
42708c762e
gl_state: Remove logic op tracker
2020-02-28 16:51:23 -03:00
ReinUsesLisp
915d73f3b8
gl_state: Remove blend color tracking
2020-02-28 16:50:58 -03:00
ReinUsesLisp
a0321b984f
gl_state: Remove polygon offset tracking
2020-02-28 16:49:20 -03:00
ReinUsesLisp
f646321dd0
gl_state: Remove alpha test tracking
2020-02-28 16:48:57 -03:00
ReinUsesLisp
c8f5f54a44
gl_state: Remove cull mode tracking
2020-02-28 16:48:23 -03:00
ReinUsesLisp
925521da5f
gl_state: Remove front face tracking
2020-02-28 16:47:59 -03:00
ReinUsesLisp
d2d5554296
gl_state: Remove point size tracking
2020-02-28 16:39:44 -03:00
ReinUsesLisp
b95f064b51
gl_rasterizer: Add oglEnablei helper
2020-02-28 16:39:44 -03:00
ReinUsesLisp
1698143a1d
gl_rasterizer: Add OpenGL enable/disable helper
2020-02-28 16:39:44 -03:00
ReinUsesLisp
96ac3d518a
gl_rasterizer: Remove dirty flags
2020-02-28 16:39:27 -03:00
bunnei
5056d23d0d
renderer_opengl: Fix SRGB presentation frame tracking.
...
- Fixes SRGB in Super Smash Bros. Ultimate.
2020-02-28 01:13:38 -05:00
Nguyen Dac Nam
6c0c2dfabc
shader_decode: Fix LD, LDG when track constant buffer
2020-02-28 13:11:19 +07:00
Morph
7ee6065178
Create an "Advanced" tab in the graphics configuration tab and add anisotropic filtering levels.
2020-02-27 21:34:00 -05:00
bunnei
969357af1a
Merge pull request #3430 from bunnei/split-presenter
...
Port citra-emu/citra#4940 : "Split Presentation thread from Render thread"
2020-02-27 19:51:55 -05:00
bunnei
ebbfe73557
renderer_opengl: Reduce swap chain size to 3.
2020-02-27 19:50:17 -05:00
Nguyen Dac Nam
db2f547434
shader: FMUL switch to using LUT ( #3441 )
...
* shader: add FmulPostFactor LUT table
* shader: FMUL apply LUT
* Update src/video_core/engines/shader_bytecode.h
Co-Authored-By: Mat M. <mathew1800@gmail.com>
* nit: mistype
* clang-format & add missing import
* shader: remove post factor LUT.
* shader: move post factor LUT to function and fix incorrect order.
* clang-format
* shader: FMUL: add static to post factor LUT
* nit: typo
Co-authored-by: Mat M. <mathew1800@gmail.com>
2020-02-27 11:14:25 -05:00
bunnei
a17214baea
renderer_opengl: Use more concise lock syntax.
2020-02-26 18:35:35 -05:00
bunnei
aef159354c
renderer_opengl: Move Frame/FrameMailbox to OpenGL namespace.
2020-02-26 18:28:50 -05:00
ReinUsesLisp
0aaa69e4d7
vk_swapchain: Silence TOCTOU race condition
...
It's possible that the window is resized from the moment we ask for its
size to the moment a swapchain is created, causing validation issues.
To workaround this Vulkan issue request the capabilities again just
before creating the swapchain, making the race condition less likely.
2020-02-26 17:07:18 -03:00
bunnei
1f57f679a4
Merge pull request #3440 from namkazt/patch-6
...
shader: implement LOP3 fast replace for old function
2020-02-26 10:24:35 -05:00
bunnei
795893a9a5
renderer_opengl: Create gl_framebuffer_data if empty.
2020-02-25 21:23:02 -05:00
bunnei
e25297536f
frontend: qt: bootmanager: Vulkan: Restore support for VK backend.
2020-02-25 21:23:01 -05:00
bunnei
667f026c95
core: frontend: Refactor scope_acquire_window_context to scope_acquire_context.
2020-02-25 21:23:00 -05:00
bunnei
dc672ca4b3
renderer_opengl: Add texture mailbox support for presenter thread.
2020-02-25 21:22:59 -05:00
bunnei
add2c38b73
renderer_opengl: Add OGLRenderbuffer to resource/state management.
2020-02-25 21:22:58 -05:00
Mat M
45ac1c62c6
Merge pull request #3461 from ReinUsesLisp/r32i-rt
...
video_core/surface: Add R32_SINT render target format
2020-02-25 17:47:14 -05:00
Mat M
00e3eab9c1
Merge pull request #3460 from ReinUsesLisp/unused-format-getter
...
video_core/gpu: Remove unused functions
2020-02-25 17:46:07 -05:00
ReinUsesLisp
466ce715e4
video_core/surface: Add R32_SINT render target format
2020-02-25 17:19:34 -03:00
ReinUsesLisp
3c648e3e2d
video_core/gpu: Remove unused functions
2020-02-25 16:53:47 -03:00
bunnei
78ab2e0474
Merge pull request #3417 from ReinUsesLisp/r32i
...
texture: Implement R32I
2020-02-25 14:08:45 -05:00
bunnei
e22ad52cdb
Merge pull request #3425 from ReinUsesLisp/layered-framebuffer
...
texture_cache: Implement layered framebuffer attachments
2020-02-24 10:14:50 -05:00
ReinUsesLisp
1e9213632a
vk_shader_decompiler: Implement indexed textures
...
Implement accessing textures through an index. It uses the same
interface as OpenGL, the main difference is that Vulkan bindings are
forced to be arrayed (the binding index doesn't change for stacked
textures in SPIR-V).
2020-02-24 01:26:07 -03:00
ReinUsesLisp
1dda77d392
shader: Simplify indexed sampler usages
2020-02-24 01:26:07 -03:00
ReinUsesLisp
e2dd59e341
video_core: Implement more scaler attribute formats
...
While changing this, fix assert in vk_shader_decompiler. We now know
scaled formats are expected to be float in shaders attributes.
2020-02-24 00:27:37 -03:00
bunnei
2b4cdb73b6
Merge pull request #3424 from ReinUsesLisp/spirv-layer
...
vk_shader_decompiler: Implement Layer output attribute
2020-02-22 23:45:16 -05:00
bunnei
754aac331f
Merge pull request #3422 from ReinUsesLisp/buffer-flush
...
surface_base: Implement texture buffer flushes
2020-02-22 23:09:50 -05:00
ReinUsesLisp
7dc488a375
shader/texture: Fix illegal 3D texture assert
...
Fix typo in the illegal 3D texture assert logic. We care about catching
arrayed 3D textures or 3D shadow textures, not regular 3D textures.
2020-02-21 15:57:27 -03:00
Rodrigo Locatti
4a6a1aeab4
Merge pull request #3433 from namkazt/patch-1
...
renderer_vulkan: Add the rest of case for TryConvertBorderColor
2020-02-21 15:56:09 -03:00
Rodrigo Locatti
ef27b4b7b5
Merge pull request #3434 from namkazt/patch-2
...
vk_shader: Implement ImageLoad
2020-02-21 15:55:05 -03:00
Rodrigo Locatti
6b2719c0bb
Merge pull request #3435 from namkazt/patch-3
...
vulkan: add DXT23_SRGB
2020-02-21 15:48:19 -03:00
bunnei
dc7ebc2d01
Merge pull request #3423 from ReinUsesLisp/no-match-3d
...
texture_cache: Avoid matches in 3D textures
2020-02-21 12:16:51 -05:00
Nguyen Dac Nam
10d8afb302
nit: add const to where it need.
2020-02-21 21:16:45 +07:00
Nguyen Dac Nam
1956a34ee5
shader: implement LOP3 fast replace for old function
...
ref: https://devtalk.nvidia.com/default/topic/1070081/cuda-programming-and-performance/reverse-lut-for-lop3-lut/
2020-02-21 19:08:07 +07:00
Nguyen Dac Nam
c0c4da27d9
vk_device: remove left over from other branch
2020-02-21 08:56:18 +07:00
bunnei
fe8e5d8ae4
Merge pull request #3438 from bunnei/gpu-mem-manager-fix
...
video_core: memory_manager: Flush/invalidate asynchronously when possible.
2020-02-20 20:04:05 -05:00
Nguyen Dac Nam
ecf275887b
clang-format
2020-02-20 09:39:30 +07:00
Nguyen Dac Nam
fbbad95845
shader_decompiler: only add StorageImageReadWithoutFormat when available
2020-02-20 09:28:13 +07:00
bunnei
bf0c929d4c
Merge pull request #3415 from ReinUsesLisp/texture-code
...
shader/texture: Allow 2D shadow arrays and simplify code
2020-02-19 20:06:14 -05:00
bunnei
d65fa7d65c
video_core: memory_manager: Flush/invalidate asynchronously on Unmap.
...
- Minor perf improvement.
2020-02-19 20:03:52 -05:00
bunnei
b2bc7682b4
Merge pull request #3414 from ReinUsesLisp/maxwell-3d-draw
...
maxwell_3d: Unify draw methods
2020-02-19 16:13:50 -05:00
bunnei
c8261a1a57
Merge pull request #3411 from ReinUsesLisp/specific-funcs
...
gl_rasterizer: Use the least generic OpenGL draw function possible
2020-02-19 15:37:41 -05:00
Nguyen Dac Nam
88cb05e6e7
shader_decompiler: add check in case of device not support ShaderStorageImageReadWithoutFormat
2020-02-19 12:57:22 +07:00
Nguyen Dac Nam
e61c7e9310
vk_device: setup shaderStorageImageReadWithoutFormat
2020-02-19 12:56:36 +07:00
Nguyen Dac Nam
47106ab152
vk_device: add check for shaderStorageImageReadWithoutFormat
2020-02-19 12:55:56 +07:00
Nguyen Dac Nam
1b6308727c
shader_conversion: I2F : add Assert for case src_size is Short
2020-02-19 11:40:35 +07:00
Nguyen Dac Nam
a2c2c5768f
fix warning
2020-02-19 11:10:26 +07:00
Nguyen Dac Nam
a8508f2bc0
clang-format fix
2020-02-19 11:02:59 +07:00
Nguyen Dac Nam
556f3a6e9a
shader_conversion: add conversion I2F for Short
2020-02-19 10:54:37 +07:00
bunnei
e545c2322c
Merge pull request #3410 from ReinUsesLisp/vk-draw-index
...
vk_shader_decompiler: Fix vertex id and instance id
2020-02-18 22:37:33 -05:00
Nguyen Dac Nam
2ef8af93aa
vk_shader: add Capability StorageImageReadWithoutFormat
2020-02-19 10:16:51 +07:00
Nguyen Dac Nam
f6f0762e81
vk_shader: Implement function ImageLoad (Used by Kirby Start Allies)
...
Please enter the commit message for your changes. Lines starting
2020-02-19 08:39:01 +07:00
Nguyen Dac Nam
ec206f7f95
fixups mistake auto commit.
2020-02-19 01:24:32 +07:00
Nguyen Dac Nam
eaf60ca5d8
Update code structure
...
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-02-19 01:23:08 +07:00
Fernando Sahmkow
93acfbd3a5
Merge pull request #3409 from ReinUsesLisp/host-queries
...
query_cache: Implement a query cache and query 21 (samples passed)
2020-02-18 11:31:06 -04:00
Nguyen Dac Nam
9295966d26
add vertex UnsignedInt size RGBA
2020-02-18 21:52:51 +07:00
Nguyen Dac Nam
9fc42fffd9
add eBc2SrgbBlock to formats
2020-02-18 21:44:09 +07:00
Nguyen Dac Nam
493f0ad904
vulkan: add DXT23_SRGB
2020-02-18 21:39:50 +07:00
Nguyen Dac Nam
ba84f0988f
renderer_vulkan: Add the rest of case for TryConvertBorderColor
2020-02-18 16:52:54 +07:00
ReinUsesLisp
6a0220b2e1
texture_cache: Implement layered framebuffer attachments
...
Layered framebuffer attachments is a feature that allows applications to
write attach layered textures to a single attachment. What layer the
fragments are written to is decided from the shader using gl_Layer.
2020-02-16 04:19:32 -03:00
ReinUsesLisp
1caf3f11c8
vk_shader_decompiler: Implement Layer output attribute
...
SPIR-V's Layer is GLSL's gl_Layer. It lets the application choose from a
shader stage (vertex, tessellation or geometry) which framebuffer layer
write the output fragments to.
2020-02-16 04:17:37 -03:00
ReinUsesLisp
bfda5ff3f6
texture_cache: Avoid matches in 3D textures
...
Code before this commit was trying to match 3D textures with another
target. Fix that.
2020-02-16 04:15:42 -03:00
ReinUsesLisp
fd62bdf377
surface_base: Implement texture buffer flushes
...
Implement downloads to guest memory from texture buffers on the generic
cache and OpenGL.
2020-02-16 04:13:27 -03:00
bunnei
0f70f68fb3
Revert "video_core: memory_manager: Use GPU interface for cache functions."
2020-02-15 17:47:15 -05:00
ReinUsesLisp
14c2a4a2ec
texture: Implement R32I
2020-02-15 16:26:50 -03:00
ReinUsesLisp
6910ade146
shader/texture: Allow 2D shadow arrays and simplify code
...
Shadow sampler 2D arrays are supported on OpenGL, so there's no reason
to forbid these. Enable textureLod usage on these.
Minor style changes.
2020-02-15 02:36:28 -03:00