Commit graph

244 commits

Author SHA1 Message Date
ReinUsesLisp
25cfbc7786 video_core: Implement RGBA16_SNORM
Implement RGBA16_SNORM with the current API. Nothing special here.
2020-03-12 21:42:33 -03:00
Rodrigo Locatti
8d86741eb9 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
bunnei
437d6b6dc6 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
09820ecef0 maxwell_to_vk: Remove Storage capability for A1B5G5R5U 2020-03-06 18:47:27 -03:00
bunnei
bd02dfb94a Merge pull request #3463 from ReinUsesLisp/vk-toctou
vk_swapchain: Silence TOCTOU race condition
2020-03-05 19:38:42 -05:00
bunnei
cb84f86f3d Merge pull request #3451 from ReinUsesLisp/indexed-textures
vk_shader_decompiler: Implement indexed textures
2020-03-05 11:42:46 -05:00
bunnei
6c42a3b9de Merge pull request #3455 from ReinUsesLisp/attr-scaled
video_core: Implement more scaled attribute formats
2020-03-03 22:46:20 -05:00
ReinUsesLisp
3de883d37b dirty_flags: Deduplicate code between OpenGL and Vulkan 2020-02-28 17:56:43 -03:00
ReinUsesLisp
a8c9550a12 vk_rasterizer: Pass Maxwell registers to dynamic updates 2020-02-28 17:56:43 -03:00
ReinUsesLisp
2eb2855b05 state_tracker: Remove type traits with named structures 2020-02-28 17:56:43 -03:00
ReinUsesLisp
59db5829f5 vk_state_tracker: Implement dirty flags for stencil properties 2020-02-28 17:56:43 -03:00
ReinUsesLisp
b06a3534ea vk_state_tracker: Implement dirty flags for depth bounds 2020-02-28 17:56:43 -03:00
ReinUsesLisp
4c4bd85947 vk_state_tracker: Implement dirty flags for blend constants 2020-02-28 17:56:43 -03:00
ReinUsesLisp
1ccf5ba777 vk_state_tracker: Implement dirty flags for depth bias 2020-02-28 17:56:43 -03:00
ReinUsesLisp
ff0c2cb0a4 vk_state_tracker: Implement dirty flags for scissors 2020-02-28 17:56:43 -03:00
ReinUsesLisp
69db1cd1f9 vk_state_tracker: Initial implementation
Add support for render targets and viewports.
2020-02-28 17:56:43 -03:00
ReinUsesLisp
95596b787e maxwell_3d: Flatten cull and front face registers 2020-02-28 17:56:41 -03:00
ReinUsesLisp
c2d3732176 gl_rasterizer: Remove dirty flags 2020-02-28 16:39:27 -03:00
ReinUsesLisp
3056f6d364 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
ba6d264342 frontend: qt: bootmanager: Vulkan: Restore support for VK backend. 2020-02-25 21:23:01 -05:00
bunnei
75487d9d84 Merge pull request #3417 from ReinUsesLisp/r32i
texture: Implement R32I
2020-02-25 14:08:45 -05:00
bunnei
80e577e2a6 Merge pull request #3425 from ReinUsesLisp/layered-framebuffer
texture_cache: Implement layered framebuffer attachments
2020-02-24 10:14:50 -05:00
ReinUsesLisp
e88187cfa0 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
367ade1151 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
f840aa27af Merge pull request #3424 from ReinUsesLisp/spirv-layer
vk_shader_decompiler: Implement Layer output attribute
2020-02-22 23:45:16 -05:00
Rodrigo Locatti
c22c0ea070 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
291a7850a3 Merge pull request #3434 from namkazt/patch-2
vk_shader: Implement ImageLoad
2020-02-21 15:55:05 -03:00
Rodrigo Locatti
2cd2a86c92 Merge pull request #3435 from namkazt/patch-3
vulkan: add DXT23_SRGB
2020-02-21 15:48:19 -03:00
Nguyen Dac Nam
c3088fd578 vk_device: remove left over from other branch 2020-02-21 08:56:18 +07:00
Nguyen Dac Nam
5b3a5b5fb6 clang-format 2020-02-20 09:39:30 +07:00
Nguyen Dac Nam
090dd95c05 shader_decompiler: only add StorageImageReadWithoutFormat when available 2020-02-20 09:28:13 +07:00
bunnei
5c5b6cf721 Merge pull request #3414 from ReinUsesLisp/maxwell-3d-draw
maxwell_3d: Unify draw methods
2020-02-19 16:13:50 -05:00
Nguyen Dac Nam
102d52ad68 shader_decompiler: add check in case of device not support ShaderStorageImageReadWithoutFormat 2020-02-19 12:57:22 +07:00
Nguyen Dac Nam
1ed0d4faea vk_device: setup shaderStorageImageReadWithoutFormat 2020-02-19 12:56:36 +07:00
Nguyen Dac Nam
d285fae01a vk_device: add check for shaderStorageImageReadWithoutFormat 2020-02-19 12:55:56 +07:00
bunnei
628c0b6a95 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
c9448bc5ba vk_shader: add Capability StorageImageReadWithoutFormat 2020-02-19 10:16:51 +07:00
Nguyen Dac Nam
c646835eb0 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
85e76831a1 fixups mistake auto commit. 2020-02-19 01:24:32 +07:00
Nguyen Dac Nam
418b7ffb21 Update code structure
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-02-19 01:23:08 +07:00
Nguyen Dac Nam
af67c90eca add vertex UnsignedInt size RGBA 2020-02-18 21:52:51 +07:00
Nguyen Dac Nam
2058556671 add eBc2SrgbBlock to formats 2020-02-18 21:44:09 +07:00
Nguyen Dac Nam
6d36df9e5d vulkan: add DXT23_SRGB 2020-02-18 21:39:50 +07:00
Nguyen Dac Nam
fa641bf689 renderer_vulkan: Add the rest of case for TryConvertBorderColor 2020-02-18 16:52:54 +07:00
ReinUsesLisp
505f30fdaf 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
6385b93c8d 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
f3255c3598 texture: Implement R32I 2020-02-15 16:26:50 -03:00
ReinUsesLisp
518a6182f9 maxwell_3d: Unify draw methods
Pass instanced state of a draw invocation as an argument instead of
having two separate virtual methods.
2020-02-14 18:09:40 -03:00
ReinUsesLisp
aaf68dc10b vk_query_cache: Implement generic query cache on Vulkan 2020-02-14 17:38:27 -03:00
ReinUsesLisp
072a0bff5e vk_shader_decompiler: Fix vertex id and instance id
Vulkan's VertexIndex and InstanceIndex don't match with hardware. This
is because Nvidia implements gl_VertexID and gl_InstanceID. The math
that relates these is:

gl_VertexIndex = gl_BaseVertex + gl_VertexID
gl_InstanceIndex = gl_InstanceIndex + gl_InstanceID

To emulate it using what Vulkan's SPIR-V offers (the *Index variants)
this commit substracts gl_Base* from gl_*Index to obtain the OpenGL and
hardware's equivalent.
2020-02-13 20:25:28 -03:00