* shader_recompiler: Move shared mem lowering into emitter
* IR can be quite verbose during first stages of translation, before ssa and constant prop passes have run that drastically simplify it. This lowering can also be done during emission so why not do it then to save some compilation time
* runtime_info: Pack PsColorBuffer into 8 bytes
* Drops the size of the total structure by half from 396 to 204 bytes. Also should make comparison of the array a bit faster, since its a hot path done every draw
* emit_spirv_context: Add infrastructure for buffer aliases
* Splits out the buffer creation function so it can be reused when defining multiple type aliases
* shader_recompiler: Merge srt_flatbuf into buffers list
* Its no longer a special case, yay
* shader_recompiler: Complete buffer aliasing support
* Add a bunch more types into buffers, such as F32 for float reads/writes and 8/16 bit integer types for formatted buffers
* shader_recompiler: Remove existing shared memory emulation
* The current impl relies on backend side implementaton and hooking into every shared memory access. It also doesnt handle atomics. Will be replaced by an IR pass that solves these issues
* shader_recompiler: Reintroduce shared memory on ssbo emulation
* Now it is performed with an IR pass, and combined with the previous commit cleanup, is fully transparent from the backend, other than requiring workgroup_index be provided as an attribute (computing this on every shared memory access is gonna be too verbose
* clang format
* buffer_cache: Reduce buffer sizes
* vk_rasterizer: Cleanup resource binding code
* Reduce noise in the functions, also remove some arguments which are class members
* Fix gcc
* shader_recompiler: Replace texel buffers with in-shader buffer format interpretation
* shader_recompiler: Move 10/11-bit float conversion to functions and address some comments.
* vulkan: Remove VK_KHR_maintenance5 as it is no longer needed for buffer views.
* shader_recompiler: Add helpers for composites and bitfields in pack/unpack.
* shader_recompiler: Use initializer_list for bitfield insert helper.
* ir: Add heuristic based LDS barrier pass
* Attempts to insert barriers after zero-depth divergant conditional blocks in shaders that use shared memory
* lds_barriers: Limit to nvidia
* Intel has historically had problems with cs barriers, will debug other time
* shader_recompiler: Tessellation WIP
* fix compiler errors after merge
DONT MERGE set log file to /dev/null
DONT MERGE linux pthread bb fix
save work
DONT MERGE dump ir
save more work
fix mistake with ES shader
skip list
add input patch control points dynamic state
random stuff
* WIP Tessellation partial implementation. Squash commits
* test: make local/tcs use attr arrays
* attr arrays in TCS/TES
* dont define empty attr arrays
* switch to special opcodes for tess tcs/tes reads and tcs writes
* impl tcs/tes read attr insts
* rebase fix
* save some work
* save work probably broken and slow
* put Vertex LogicalStage after TCS and TES to fix bindings
* more refactors
* refactor pattern matching and optimize modulos (disabled)
* enable modulo opt
* copyright
* rebase fixes
* remove some prints
* remove some stuff
* Add TCS/TES support for shader patching and use LogicalStage
* refactor and handle wider DS instructions
* get rid of GetAttributes for special tess constants reads. Immediately replace some upon seeing readconstbuffer. Gets rid of some extra passes over IR
* stop relying on GNMX HsConstants struct. Change runtime_info.hs_info and some regs
* delete some more stuff
* update comments for current implementation
* some cleanup
* uint error
* more cleanup
* remove patch control points dynamic state (because runtime_info already depends on it)
* fix potential problem with determining passthrough
---------
Co-authored-by: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com>
Games can strip the first shader instruction (meant for debugging) which we rely on for obtaining shader information (e.g. LittleBigPlanet 3). For this reason, we start a search through the code start until we arrive at the shader binary info.
* Implement shader resource tables
* fix after rebase + squash
* address some review comments
* fix pipeline_common
* cleanup debug stuff
* switch to using single codegenerator
* shader_recompiler: Use null image when shader is compiled with unbound sharp
* video_core: Refactor and render target swizzles
* liverpool_to_vk: Add missing swap format from RDR
* video_core: Refactor shader recompiler interface
* Makes it much easier to pass runtime information to the recompiler and have it treated as part of the shader key. Also pulls out most runtime state from Info struct
* shader_recompiler: Avoid some asserts
* video_core: Compile shader permutations
* spirv: Only specific storage image format for atomics
* ir: Avoid cube coord patching for storage image
* spirv: Fix default attributes
* data_share: Add more instructions
* video_core: Query storage flag with runtime state
* kernel: Use std::list for semaphore
* video_core: Use texture buffers for untyped format load/store
* buffer_cache: Limit view usage
* vk_pipeline_cache: Fix invalid iterator
* image_view: Reduce log spam when alpha=1 in storage swizzle
* video_core: More features and proper spirv feature detection
* video_core: Attempt no2 for specialization
* spirv: Remove conflict
* vk_shader_cache: Small cleanup
* translator: Implemtn f32 to f16 convert
* shader_recompiler: Add bit instructions
* shader_recompiler: More data share instructions
* shader_recompiler: Remove exec contexts, fix S_MOV_B64
* shader_recompiler: Split instruction parsing into categories
* shader_recompiler: Better BFS search
* shader_recompiler: Constant propagation pass for cmp_class_f32
* shader_recompiler: Partial readfirstlane implementation
* shader_recompiler: Stub readlane/writelane only for non-compute
* hack: Fix swizzle on RDR
* Will properly fix this when merging this
* clang format
* address_space: Bump user area size to full
* shader_recompiler: V_INTERP_MOV_F32
* Should work the same as spirv will emit flat decoration on demand
* kernel: Add MAP_OP_MAP_FLEXIBLE
* image_view: Attempt to apply storage swizzle on format
* vk_scheduler: Barrier attachments on renderpass end
* clang format
* liverpool: cs state backup
* shader_recompiler: More instructions and formats
* vector_alu: Proper V_MBCNT_U32_B32
* shader_recompiler: Port some dark souls things
* file_system: Implement sceKernelRename
* more formats
* clang format
* resource_tracking_pass: Back to assert
* translate: Tracedata
* kernel: Remove tracy lock
* Solves random crashes in Dark Souls
* code: Review comments
* video_core: Remove hack in rasterizer
* The hack was to skip the first draw as the display buffer had not been created yet and the texture cache couldn't create one itself. With this patch it now can, using the color buffer parameters from registers
* shader_recompiler: Implement attribute loads/stores
* video_core: Add basic vertex, index buffer handling and pipeline caching
* externals: Make xxhash lowercase