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.
6 years ago
Nguyen Dac Nam
bf1174c114
Apply suggestions from code review
...
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
6 years ago
Fernando Sahmkow
f9d5718c4b
Clang Format.
6 years ago
Fernando Sahmkow
ea535d9470
Shader/Pipeline Cache: Use VAddr instead of physical memory for addressing.
6 years ago
Fernando Sahmkow
3dd5c07454
Query Cache: Use VAddr instead of physical memory for adressing.
6 years ago
Fernando Sahmkow
7fcd0fee6d
Buffer Cache: Use vAddr instead of physical memory.
6 years ago
Fernando Sahmkow
6ee316cb8f
Texture Cache: Use vAddr instead of physical memory for caching.
6 years ago
Fernando Sahmkow
9c0f40a1f5
GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr
6 years ago
Fernando Sahmkow
588a20be3f
Merge pull request #3513 from ReinUsesLisp/native-astc
...
video_core: Use native ASTC when available
6 years ago
namkazy
2c98e14d13
shader_decode: SULD.D using std::pair instead of out parameter
6 years ago
namkazy
9efa51311f
shader_decode: SULD.D avoid duplicate code block.
6 years ago
namkazy
7f5696513f
shader_decode: SULD.D fix conversion error.
6 years ago
namkazy
2906372ba1
shader_decode: SULD.D implement bits64 and reverse shader ir init method to removed shader stage.
6 years ago
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.
6 years ago
ReinUsesLisp
fd0a2b5151
shader/memory: Add "using std::move"
6 years ago
ReinUsesLisp
79970c9174
shader/memory: Minor fixes in ATOM
6 years ago
Fernando Sahmkow
69277de29d
Merge pull request #3592 from ReinUsesLisp/ipa
...
shader_decompiler: Remove FragCoord.w hack and change IPA implementation
6 years ago
Fernando Sahmkow
1633fbf99a
Merge pull request #3589 from ReinUsesLisp/fix-clears
...
gl_rasterizer: Mark cleared textures as dirty
6 years ago
namkazy
730f9b55b3
silent warning (conversion error)
6 years ago
namkazy
9f6ebccf06
shader_decode: SULD.D -> SINT actually same as UNORM.
6 years ago
namkazy
6f2b7087c2
shader_decode: SULD.D fix decode SNORM component
6 years ago
namkazy
69657ff19c
clang-format
6 years ago
namkazy
24cc64c5b3
shader_decode: get sampler descriptor from registry.
6 years ago
namkazy
acd3f0ab37
tweaking.
6 years ago
Nguyen Dac Nam
8370188b3c
clang-format
6 years ago
namkazy
3e3afa9be6
cleanup unuse params
6 years ago
namkazy
5cd5857000
cleanup debug code.
6 years ago
namkazy
658112783d
reimplement get component type, uncomment mistaken code
6 years ago
namkazy
3ad06e9b2b
remove disable optimize
6 years ago
namkazy
f24c2e1103
[wip] reimplement SULD.D
6 years ago
namkazy
58bcb86af5
add shader stage when init shader ir
6 years ago
Nguyen Dac Nam
2cefdd92bd
clang-fix
6 years ago
Nguyen Dac Nam
1f3d142875
shader: image - import PredCondition
6 years ago
Nguyen Dac Nam
08db60392d
shader: SULD.D bits32 implement more complexer method.
6 years ago
Nguyen Dac Nam
ed1d8beb13
shader: SULD.D import StoreType
6 years ago
Nguyen Dac Nam
6d235b8631
shader: implement SULD.D bits32
6 years ago
ReinUsesLisp
60106531b4
shader/other: Add error message for some S2R registers
6 years ago
ReinUsesLisp
8b719e9e1d
shader_bytecode: Rename MOV_SYS to S2R
6 years ago
ReinUsesLisp
9d15feb892
shader_bytecode: Add encoding for BAR
6 years ago
ReinUsesLisp
16ae98dbb3
shader_ir: Add error message for EXIT.FCSM_TR
6 years ago
ReinUsesLisp
c02a2dc24a
shader_bytecode: Add encoding for VOTE.VTG
6 years ago
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.
6 years ago
ReinUsesLisp
e1bd89e1c2
shader/memory: Silence no return value warning
...
Silences a warning about control paths not all returning a value.
6 years ago
Rodrigo Locatti
825a6e2615
Merge pull request #3552 from jroweboy/single-context
...
Refactor Context management (Fixes renderdoc on opengl issues)
6 years ago
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
6 years ago
ReinUsesLisp
dd1232755b
gl_texture_cache: Fix software ASTC fallback
6 years ago
ReinUsesLisp
2f0da10dc3
vk_device: Add missing ASTC queries
6 years ago
ReinUsesLisp
b6571ca9f0
video_core: Use native ASTC when available
6 years ago
ReinUsesLisp
16270dcfe4
gl_device: Detect if ASTC is reported and expose it
6 years ago
Rodrigo Locatti
baf91c920c
Merge pull request #3591 from ReinUsesLisp/vk-wrapper-part2
...
renderer_vulkan/wrapper: Add a Vulkan wrapper (part 2 of 2)
6 years ago
ReinUsesLisp
f22f6b72c3
renderer_vulkan/wrapper: Add vkEnumerateInstanceExtensionProperties wrapper
6 years ago
ReinUsesLisp
27dd542c60
renderer_vulkan/wrapper: Add command buffer handle
6 years ago
ReinUsesLisp
5c90d060d8
renderer_vulkan/wrapper: Add physical device handle
6 years ago
ReinUsesLisp
0eb37de98f
renderer_vulkan/wrapper: Add device handle
6 years ago
ReinUsesLisp
11774308d3
renderer_vulkan/wrapper: Add swapchain handle
6 years ago
ReinUsesLisp
7fe52ef77f
renderer_vulkan/wrapper: Add fence handle
6 years ago
ReinUsesLisp
3a63ae0658
renderer_vulkan/wrapper: Add device memory handle
6 years ago
ReinUsesLisp
397f53dea1
renderer_vulkan/wrapper: Add pool handles
6 years ago
ReinUsesLisp
affee77b70
renderer_vulkan/wrapper: Add buffer and image handles
6 years ago
ReinUsesLisp
d85ca0ab33
renderer_vulkan/wrapper: Add queue handle
6 years ago
ReinUsesLisp
151ddcf419
renderer_vulkan/wrapper: Add instance handle
6 years ago
Fernando Sahmkow
b03c0536ce
Merge pull request #3561 from ReinUsesLisp/f2f-conversion
...
shader/conversion: Fix F2F rounding operations with different sizes
6 years ago
Fernando Sahmkow
5b95a01463
Merge pull request #3577 from ReinUsesLisp/lea
...
shader/lea: Fix LEA implementation
6 years ago
ReinUsesLisp
1c5e2b60a7
gl_rasterizer: Mark cleared textures as dirty
...
Fixes a potential edge case where cleared textures read from the CPU
were not flushed.
6 years ago
Rodrigo Locatti
c19425ed69
Merge pull request #3506 from namkazt/patch-9
...
shader_decode: Implement partial ATOM/ATOMS instr
6 years ago
Nguyen Dac Nam
238c35b2c9
clang-format
6 years ago
Nguyen Dac Nam
defb9642da
shader_decode: fix by suggestion
6 years ago
Rodrigo Locatti
69728e8ad5
Merge pull request #3566 from ReinUsesLisp/vk-wrapper-part1
...
renderer_vulkan/wrapper: Add a Vulkan wrapper (part 1 of 2)
6 years ago
bunnei
4c72190a06
Merge pull request #3560 from ReinUsesLisp/fix-stencil
...
gl_rasterizer: Synchronize stencil testing on clears
6 years ago
namkazy
cb0a4151f8
clang-format
6 years ago
namkazy
c2665ec9c2
gl_decompiler: min/max op not implement yet
6 years ago
namkazy
4f7bea403a
shader_decode: ATOM/ATOMS: add function to avoid code repetition
6 years ago
namkazy
c8f6d9effd
shader_decode: merge GlobalAtomicOp to AtomicOp
6 years ago
Nguyen Dac Nam
972485ff18
shader_decode: implement ATOM operation for S32 and U32
6 years ago
namkazy
93cac0d294
clang-format
6 years ago
Nguyen Dac Nam
3dc09a6250
shader_decode: implement ATOMS instr partial.
6 years ago
Nguyen Dac Nam
a2cc80b605
vk_decompiler: add atomic op and handler function.
6 years ago
Nguyen Dac Nam
552f0ff267
gl_decompiler: add atomic op
6 years ago
Nguyen Dac Nam
2c780db5b9
shader: node - update correct comment
6 years ago
Nguyen Dac Nam
c119473c40
shader_decode: add Atomic op for common usage
6 years ago
ReinUsesLisp
08470d261d
shader_bytecode: Fix I2I_IMM encoding
6 years ago
ReinUsesLisp
b6c9fba81c
renderer_vulkan/wrapper: Address feedback
6 years ago
ReinUsesLisp
5300a918c6
shader/lea: Simplify generated LEA code
6 years ago
ReinUsesLisp
523a709bf1
shader/lea: Fix op_a and op_b usages
...
They were swapped.
6 years ago
ReinUsesLisp
796b3319e6
shader/lea: Remove const and use move when possible
6 years ago
Fernando Sahmkow
7a2f60df26
Merge pull request #3565 from ReinUsesLisp/image-format
...
engines/const_buffer_engine_interface: Store image format and types
6 years ago
ReinUsesLisp
2694552b7f
renderer_vulkan/wrapper: Add owning handles
6 years ago
ReinUsesLisp
7413b30923
renderer_vulkan/wrapper: Add pool allocations owning templated class
6 years ago
ReinUsesLisp
d8d392b39a
renderer_vulkan/wrapper: Add owning handle templated class
6 years ago
ReinUsesLisp
60f351084a
renderer_vulkan/wrapper: Add destroy and free overload set
6 years ago
ReinUsesLisp
a9e4528d10
renderer_vulkan/wrapper: Add dispatch table and loaders
6 years ago
ReinUsesLisp
3f0b7673f0
renderer_vulkan/wrapper: Add exception class
6 years ago
ReinUsesLisp
f5cee0e885
renderer_vulkan/wrapper: Add ToString function for VkResult
6 years ago
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.
6 years ago
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).
6 years ago
Dan
744b207d92
maxwell_to_vk: implement signedscaled vertex formats
6 years ago
James Rowe
cf9c94d401
Address review and fix broken yuzu-tester build
6 years ago
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.
6 years ago
ReinUsesLisp
7617e88fb2
gl_rasterizer: Update stencil test regardless of it being disabled
6 years ago
ReinUsesLisp
c310cef615
gl_rasterizer: Synchronize stencil testing on clears
6 years ago
bunnei
23c7dda710
Merge pull request #3544 from makigumo/myfork/patch-2
...
xmad: fix clang build error
6 years ago
bunnei
e6aff11057
Merge pull request #3520 from ReinUsesLisp/legacy-varyings
...
gl_shader_decompiler: Implement legacy varyings
6 years ago
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
6 years ago
Fernando Sahmkow
497f593525
Merge pull request #3543 from ReinUsesLisp/gl-depth-range
...
gl_rasterizer: Use transformed viewport for depth ranges
6 years ago
makigumo
5a5c6d4ed8
xmad: fix clang build error
6 years ago
namkazy
fc37672f26
apply replay logic to all writes. remove replay from MacroInterpreter::Send (@fincs)
6 years ago
namkazy
f66743cd0c
maxwell_3d: change declaration order
6 years ago
namkazy
d4e93cf38c
maxwell_3d: init shadow_state
6 years ago
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.
6 years ago
namkazy
22f4268c2f
maxwell_3d: this seem more correct.
6 years ago
namkazy
7051dc1902
maxwell_3d: update comments for shadow ram usage
6 years ago
Nguyen Dac Nam
01af036c1f
marco_interpreter: write hw value when shadow ram requested
6 years ago
Nguyen Dac Nam
63c2635e6f
maxwell_3d: track shadow ram ctrl and hw reg value
6 years ago
Nguyen Dac Nam
dbfbe352e0
maxwell_3d: implement MME shadow RAM
6 years ago
bunnei
bdddbe2daa
Merge pull request #3505 from namkazt/patch-8
...
shader_decode: implement XMAD mode CSfu
6 years ago
ReinUsesLisp
38c1e77f01
vk_texture_cache: Silence misc warnings
6 years ago
ReinUsesLisp
b6b2e31e5e
vk_staging_buffer_pool: Silence unused constant warning
6 years ago
ReinUsesLisp
fc51ece7bf
vk_rasterizer: Remove unused variable
6 years ago
ReinUsesLisp
98d85cdc20
vk_pipeline_cache: Remove unused variable
6 years ago
ReinUsesLisp
dab450ec46
maxwell_to_vk: Sielence -Wswitch warning
6 years ago
ReinUsesLisp
351816ac38
gl_shader_decompiler: Remove deprecated function and its usages
6 years ago
ReinUsesLisp
acf328a71f
gl_rasterizer: Silence misc warnings
6 years ago
ReinUsesLisp
9f46066bda
kepler_compute: Remove unused variables
6 years ago
ReinUsesLisp
664fa4ea06
astc: Fix clang build issues
6 years ago
ReinUsesLisp
f5658a9fda
gl_shader_decompiler: Don't redeclare gl_VertexID and gl_InstanceID
6 years ago
Mat M
edb9cccb36
Merge pull request #3510 from FernandoS27/dirty-write
...
DirtyFlags: relax need to set render_targets as dirty
6 years ago
Mat M
f54d2d3114
Merge pull request #3509 from ReinUsesLisp/astc-opts
...
astc: General changes and optimizations
6 years ago
Mat M
d787856621
Merge pull request #3518 from ReinUsesLisp/scissor-clears
...
vk_rasterizer: Implement scissor clears and layered clears
6 years ago
Mat M
9fdfd58f9f
Merge pull request #3519 from ReinUsesLisp/int-formats
...
maxwell_to_vk: Implement RG32 and RGB32 integer vertex formats
6 years ago
bunnei
1c45c8086e
Merge pull request #3498 from ReinUsesLisp/texel-fetch-glsl
...
gl_shader_decompiler: Add layer component to texelFetch
6 years ago
ReinUsesLisp
53d673a7d3
renderer_opengl: Move some logic to an anonymous namespace
6 years ago
ReinUsesLisp
311d2fc768
renderer_opengl: Detect Nvidia Nsight as a debugging tool
...
Use getenv to detect Nsight.
6 years ago
Rodrigo Locatti
b16c8e0e8d
Merge pull request #3515 from ReinUsesLisp/vertex-vk-assert
...
vk_rasterizer: Fix vertex range assert
6 years ago
Rodrigo Locatti
7cc46a6faa
Merge pull request #3501 from ReinUsesLisp/rgba16-snorm
...
video_core: Implement RGBA16_SNORM
6 years ago
Rodrigo Locatti
ddafc99776
Merge pull request #3502 from namkazt/patch-3
...
shader_decode: Reimplement BFE instructions
6 years ago
Rodrigo Locatti
d64edf21bb
Merge pull request #3503 from makigumo/patch-2
...
maxwell_to_vk: add vertex format eA2B10G10R10UnormPack32
6 years ago
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.
6 years ago
ReinUsesLisp
6442e02c5d
shader/shader_ir: Track usage in input attribute and of legacy varyings
6 years ago
ReinUsesLisp
8e6e55d6f8
shader/shader_ir: Fix clip distance usage stores
6 years ago
ReinUsesLisp
464bd5fad7
shader/shader_ir: Change declare output attribute to a switch
6 years ago
Rodrigo Locatti
86b1f15d9a
Merge pull request #3512 from bunnei/fix-renderdoc
...
renderer_opengl: Keep frames synchronized when using a GPU debugger.
6 years ago
ReinUsesLisp
52acb7f9a0
maxwell_to_vk: Implement RG32 and RGB32 integer vertex formats
6 years ago
ReinUsesLisp
71cc772988
vk_rasterizer: Implement layered clears
6 years ago
makigumo
f91046bf8d
vk_shader_decompiler: fix linux build
6 years ago
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.
6 years ago
ReinUsesLisp
8baf98e439
vk_rasterizer: Reimplement clears with vkCmdClearAttachments
6 years ago
bunnei
c5afe93dcc
renderer_opengl: Keep presentation frames in lock-step when GPU debugging.
...
- Fixes renderdoc with OpenGL renderer.
6 years ago
bunnei
4373fa8042
gl_device: Add option to check GL_EXT_debug_tool.
6 years ago
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.
6 years ago
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.
6 years ago
Fernando Sahmkow
c51dbf8038
Merge pull request #3500 from ReinUsesLisp/incompatible-types
...
texture_cache: Report incompatible textures as black
6 years ago
Fernando Sahmkow
41905ee467
Merge pull request #3499 from ReinUsesLisp/depth-2d-array
...
texture_cache/surface_params: Force depth=1 on 2D textures
6 years ago
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.
6 years ago
ReinUsesLisp
42cb8f1124
astc: Fix typos from search and replace
6 years ago
ReinUsesLisp
9b8fb3c756
astc: Minor changes to InputBitStream
6 years ago
ReinUsesLisp
d71d7d917e
astc: Pass val in Replicate by copy
6 years ago
ReinUsesLisp
134f3ff9b4
astc: Call std::vector:reserve on decodedClolorValues to avoid reallocating
6 years ago
Nguyen Dac Nam
3287b1247d
clang-format
6 years ago
Nguyen Dac Nam
240d45830d
nit
6 years ago
ReinUsesLisp
3377b78ea7
astc: Call std::vector::reserve on texelWeightValues to avoid reallocating
6 years ago
ReinUsesLisp
801fd04f75
astc: Create a LUT at compile time for encoding values
6 years ago
ReinUsesLisp
e183820956
astc: Make IntegerEncodedValue a trivial structure
6 years ago
ReinUsesLisp
70a31eda62
astc: Make IntegerEncodedValue constructor constexpr
6 years ago
ReinUsesLisp
5ed377b989
astc: Make IntegerEncodedValue trivially copyable
6 years ago
ReinUsesLisp
e7d97605e8
astc: Rename C types to common_types
6 years ago
ReinUsesLisp
835a3d09c6
astc: Move Popcnt to an anonymous namespace and make it constexpr
6 years ago
ReinUsesLisp
731a9a322e
astc: Use common types instead of stdint.h integer types
6 years ago
ReinUsesLisp
d3dc4e399c
astc: Use 'enum class' instead of 'enum' for EIntegerEncoding
6 years ago
ReinUsesLisp
69c7a01f88
vk/gl_shader_decompiler: Silence assertion on compute
6 years ago
ReinUsesLisp
62560f1e63
vk_shader_decompiler: Fix default varying regression
6 years ago
ReinUsesLisp
afebdda203
maxwell_3d: Add padding words to XFB entries
...
Use INSERT_UNION_PADDING_WORDS instead of alignas to ensure a size
requirement.
6 years ago
ReinUsesLisp
4bc4851d45
gl_shader_decompiler: Fix implicit conversion errors
6 years ago
Rodrigo Locatti
47459f6a36
vk_shader_decompiler: Fix implicit type conversion
...
Co-Authored-By: Mat M. <mathew1800@gmail.com>
6 years ago
ReinUsesLisp
2fae1e6205
vk_rasterizer: Implement transform feedback binding zero
6 years ago
ReinUsesLisp
b67360c0f8
vk_shader_decompiler: Add XFB decorations to generic varyings
6 years ago
ReinUsesLisp
8d5bdcb17b
vk_device: Enable VK_EXT_transform_feedback when available
6 years ago
ReinUsesLisp
c320702092
vk_device: Shrink formatless capability name size
6 years ago
ReinUsesLisp
ae6189d7c2
shader/transform_feedback: Expose buffer stride
6 years ago
ReinUsesLisp
7acebd7eb6
vk_shader_decompiler: Use registry for specialization
6 years ago
ReinUsesLisp
8e9f23f393
gl_rasterizer: Implement transform feedback bindings
6 years ago
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).
6 years ago
ReinUsesLisp
3dcaa84ba4
shader/transform_feedback: Add host API friendly TFB builder
6 years ago
Rodrigo Locatti
244fe13219
Merge branch 'master' into shader-purge
6 years ago
bunnei
b30b1f741d
Merge pull request #3491 from ReinUsesLisp/polygon-modes
...
gl_rasterizer: Implement polygon modes and fill rectangles
6 years ago
Nguyen Dac Nam
829f424618
nit & remove some optional param
6 years ago
Nguyen Dac Nam
a166217480
shader_decode: implement XMAD mode CSfu
6 years ago
makigumo
753bc2026f
fix formatting
6 years ago
makigumo
54681909be
maxwell_to_vk: add vertex format eA2B10G10R10UnormPack32
6 years ago
Nguyen Dac Nam
00607fe1e0
clang-format
6 years ago
Nguyen Dac Nam
325977c0c6
Apply suggestions from code review
...
Co-Authored-By: Mat M. <mathew1800@gmail.com>
6 years ago
Nguyen Dac Nam
70ff82f72d
shader_decode: BFE add ref of reverse parallel method.
6 years ago
Nguyen Dac Nam
96a4abe12d
shader_decode: implement BREV on BFE
...
Implement reverse parallel follow: https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel
6 years ago
Nguyen Dac Nam
93547cac68
shader_bytecode: update BFE instructions struct.
6 years ago
Nguyen Dac Nam
911c56ccef
node_helper: add IBitfieldExtract case
6 years ago
Nguyen Dac Nam
465ba30d08
shader_decode: Reimplement BFE instructions
6 years ago
ReinUsesLisp
e24197bb3f
gl_shader_decompiler: Initialize gl_Position on vertex shaders
6 years ago
Fernando Sahmkow
00e9ba0603
Merge pull request #3483 from namkazt/patch-1
...
vk_rasterizer: fix mistype on SetupGraphicsImages
6 years ago
Fernando Sahmkow
f159a12820
Merge pull request #3480 from ReinUsesLisp/vk-disabled-ubo
...
vk_rasterizer: Support disabled uniform buffers
6 years ago
ReinUsesLisp
3a10016e38
gl_shader_decompiler: Add missing {} on smem GLSL emission
6 years ago
ReinUsesLisp
4dcca90ef4
video_core: Implement RGBA16_SNORM
...
Implement RGBA16_SNORM with the current API. Nothing special here.
6 years ago
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.
6 years ago
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.
6 years ago
ReinUsesLisp
38fe070d78
gl_shader_decompiler: Add layer component to texelFetch
...
TexelFetch was not emitting the array component generating invalid GLSL.
6 years ago
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.
6 years ago
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.
6 years ago
ReinUsesLisp
e4bc3c3342
gl_rasterizer: Implement polygon modes and fill rectangles
6 years ago
ReinUsesLisp
eb5861e0a2
engines/maxwell_3d: Add TFB registers and store them in shader registry
6 years ago
ReinUsesLisp
b1acb4f73f
shader/registry: Address feedback
6 years ago
ReinUsesLisp
b1061afed9
gl_shader_decompiler: Add identifier to decompiled code
6 years ago
ReinUsesLisp
e612242977
gl_shader_decompiler: Roll back to GLSL core 430
...
RenderDoc won't build shaders if we use GLSL compatibility.
6 years ago
ReinUsesLisp
978172530e
const_buffer_engine_interface: Store component types
...
This is required for Vulkan. Sampling integer textures with float
handles is illegal.
6 years ago
ReinUsesLisp
120f688272
yuzu/loading_screen: Remove unused shader progress mode
6 years ago
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.
6 years ago
ReinUsesLisp
66a8a3e887
shader/registry: Cache tessellation state
6 years ago
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).
6 years ago
ReinUsesLisp
e8efd5a901
video_core: Rename "const buffer locker" to "registry"
6 years ago
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.
6 years ago
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
6 years ago
ReinUsesLisp
1aa75b1081
textures: Fix anisotropy hack
...
Previous code could generate an anisotropy value way higher than x16.
6 years ago
bunnei
84e9f9f395
Merge pull request #3452 from Morph1984/anisotropic-filtering
...
frontend/Graphics: Add "Advanced" graphics tab and experimental Anisotropic Filtering support
6 years ago
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.
6 years ago
bunnei
662feb8c1c
Merge pull request #3481 from ReinUsesLisp/abgr5-storage
...
maxwell_to_vk: Remove Storage capability for A1B5G5R5U
6 years ago
ReinUsesLisp
e4f9ce0379
vk_rasterizer: Support disabled uniform buffers
6 years ago
ReinUsesLisp
aa6fe3f1aa
maxwell_to_vk: Remove Storage capability for A1B5G5R5U
6 years ago
bunnei
49eff536d0
Merge pull request #3463 from ReinUsesLisp/vk-toctou
...
vk_swapchain: Silence TOCTOU race condition
6 years ago
bunnei
0361aa1915
Merge pull request #3451 from ReinUsesLisp/indexed-textures
...
vk_shader_decompiler: Implement indexed textures
6 years ago
bunnei
fa1d625eed
Merge pull request #3469 from namkazt/patch-1
...
shader_decode: Fix LD, LDG when track constant buffer
6 years ago
bunnei
67e7186d79
Merge pull request #3455 from ReinUsesLisp/attr-scaled
...
video_core: Implement more scaled attribute formats
6 years ago
Nguyen Dac Nam
85a4222a8c
nit: move comment to right place.
6 years ago
ReinUsesLisp
735c003a70
video_core/dirty_flags: Address feedback
6 years ago
ReinUsesLisp
ef7f6eb67d
renderer_opengl: Fix edge-case where alpha testing might cull presentation
6 years ago
ReinUsesLisp
a6a350ddc3
gl_texture_cache: Remove blending disable on blits
...
Blending doesn't affect blits. Rasterizer discard does, update the
commentaries.
6 years ago
ReinUsesLisp
887d5288ef
gl_rasterizer: Don't disable blending on clears
...
Blending doesn't affect clears.
6 years ago
ReinUsesLisp
ac204754d4
dirty_flags: Deduplicate code between OpenGL and Vulkan
6 years ago
ReinUsesLisp
6669b359a3
vk_rasterizer: Pass Maxwell registers to dynamic updates
6 years ago
ReinUsesLisp
042256c6bb
state_tracker: Remove type traits with named structures
6 years ago
ReinUsesLisp
6ac3eb4d87
vk_state_tracker: Implement dirty flags for stencil properties
6 years ago
ReinUsesLisp
f9df2c6bcd
vk_state_tracker: Implement dirty flags for depth bounds
6 years ago
ReinUsesLisp
cd0e28c9ec
vk_state_tracker: Implement dirty flags for blend constants
6 years ago
ReinUsesLisp
a33870996b
vk_state_tracker: Implement dirty flags for depth bias
6 years ago
ReinUsesLisp
42f1874965
vk_state_tracker: Implement dirty flags for scissors
6 years ago
ReinUsesLisp
1bd95a314f
vk_state_tracker: Initial implementation
...
Add support for render targets and viewports.
6 years ago
ReinUsesLisp
b1498d2c54
gl_rasterizer: Remove num vertex buffers magic number
6 years ago
ReinUsesLisp
62437943a7
gl_rasterizer: Only apply polygon offset clamp if enabled
6 years ago
ReinUsesLisp
2eeea90713
gl_state_tracker: Implement dirty flags for depth clamp enabling
6 years ago
ReinUsesLisp
3ce66776ec
gl_rasterizer: Disable scissor 0 when scissor is not used on clear
6 years ago
ReinUsesLisp
35bb9239ca
gl_rasterizer: Notify depth mask changes on clear
6 years ago
ReinUsesLisp
98c8948b23
gl_rasterizer: Minor sort changes to clearing
6 years ago
ReinUsesLisp
15cadc3948
maxwell_3d: Use two tables instead of three for dirty flags
6 years ago
ReinUsesLisp
a5bfc0d045
gl_state_tracker: Track state of index buffers
6 years ago