Commit graph

15 commits

Author SHA1 Message Date
gdkchan
66f16f4392
Fix bindless 1D textures having a buffer type on the shader (#3697)
* Fix bindless 1D textures having a buffer type on the shader

* Shader cache version bump
2022-09-13 08:53:55 +02:00
gdkchan
5afd521c5a
Bindless elimination for constant sampler handle (#3424)
* Bindless elimination for constant sampler handle

* Shader cache version bump

* Update TextureHandle.ReadPackedId for new bindless elimination
2022-07-02 15:03:35 -03:00
gdkchan
04dfb86fde
Preserve image types for shader bindless surface instructions (.D variants) (#2779)
* Preserve image types for SULD/SUST .D variants

* Make format unknown for surface atomic if bindless and not sized
2021-10-24 19:40:20 -03:00
gdkchan
25fd4ef10e
Extend bindless elimination to work with masked and shifted handles (#2727)
* Extent bindless elimination to work with masked handles

* Extend bindless elimination to catch shifted pattern, refactor handle packing/unpacking
2021-10-17 17:28:18 -03:00
riperiperi
f0b00c1ae9
Fix TXQ for 3D textures. (#2613)
* Fix TXQ for 3D textures.

Assumes the texture is 3D if the component mask contains Z.

This fixes a bug in UE4 games where parts of the map had garbage pointers to lighting voxels, as the lookup 3D texture was not being initialized. Most notable game is THPS1+2.

May need another PR to keep image store data alive and properly flush it in order using the AutoDeleteCache.

* Get sampler type for TextureSize from bound textures.
2021-09-02 00:17:43 -03:00
riperiperi
142cededd4
Implement Shader Instructions SUATOM and SURED (#2090)
* Initial Implementation

* Further improvements (no support for float/64-bit types)

* Merge atomic and reduce instructions, add missing format switch

* Fix rebase issues.

* Not used.

* Whoops. Fixed.

* Partial implementation of inc/dec, cleanup and TODOs

* Remove testing path

* Address Feedback
2021-08-31 02:51:57 -03:00
gdkchan
65fee49e8a
Fix separate bindless sampler at offset 0 (#2360) 2021-06-20 20:48:12 +02:00
gdkchan
02e2e561ac
Support bindless textures with separate constant buffers for texture and sampler (#2339) 2021-06-09 00:42:25 +02:00
gdkchan
49745cfa37
Move shader resource descriptor creation out of the backend (#2290)
* Move shader resource descriptor creation out of the backend

* Remove now unused code, and other nits

* Shader cache version bump

* Nits

* Set format for bindless image load/store

* Fix buffer write flag
2021-05-19 23:15:26 +02:00
riperiperi
0129250c2e
Pass CbufSlot when getting info from the texture descriptor (#2291)
* Pass CbufSlot when getting info from the texture descriptor

Fixes some issues with bindless textures, when CbufSlot is not equal to the current TextureBufferIndex.

Specifically fixes a random chance of full screen colour flickering in Super Mario Party.

* Apply suggestions from code review

Oops

Co-authored-by: gdkchan <gab.dark.100@gmail.com>

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2021-05-19 20:05:43 +02:00
gdkchan
40e276c9b5
Improve shader global memory to storage pass (#2200)
* Improve shader global memory to storage pass

* Formatting and more comments

* Shader cache version bump
2021-04-18 12:31:39 +02:00
riperiperi
ede26556f2
Traverse PhiNodes for Bindless Elimination (#2089)
This allows bindless handles to be found for image/texture instructions with predicates, when the assignment of the texture handle is within the same predicate.

This seems to cover the remaining bindless handles that compilers seem to be creating due to optimizations.

Will affect newer UE4 games, and games by NdCube (Super Mario Party, Clubhouse Games)
2021-03-09 17:27:44 -03:00
gdkchan
934a78005e
Simplify logic for bindless texture handling (#1667)
* Simplify logic for bindless texture handling

* Nits
2020-11-09 19:35:04 -03:00
gdkchan
e13154c83d
Implement shader LEA instruction and improve bindless image load/store (#1355) 2020-07-04 01:48:44 +02:00
gdkchan
5795bb1528
Support separate textures and samplers (#1216)
* Support separate textures and samplers

* Add missing bindless flag, fix SNORM format on buffer textures

* Add missing separation

* Add comments about the new handles
2020-05-27 16:07:10 +02:00