mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 08:15:59 +03:00
[PR #148] [MERGED] video_core: Add linear image support #1337
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#1337
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/148
Author: @raphaelthegreat
Created: 5/27/2024
Status: ✅ Merged
Merged: 5/27/2024
Merged by: @psucien
Base:
main← Head:images📝 Commits (2)
d59b102video_core: Add image support4d728e9video_core: Address some feedback📊 Changes
48 files changed (+1263 additions, -248 deletions)
View changed files
📝
CMakeLists.txt(+2 -0)📝
src/common/config.cpp(+17 -10)📝
src/common/config.h(+1 -0)📝
src/core/libraries/gnmdriver/gnmdriver.cpp(+9 -4)📝
src/core/libraries/kernel/event_queue.cpp(+0 -1)📝
src/core/libraries/kernel/libkernel.cpp(+2 -1)📝
src/core/memory.cpp(+2 -0)📝
src/shader_recompiler/backend/spirv/emit_spirv.cpp(+2 -2)📝
src/shader_recompiler/backend/spirv/emit_spirv.h(+1 -7)📝
src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp(+12 -19)📝
src/shader_recompiler/backend/spirv/emit_spirv_image.cpp(+8 -3)📝
src/shader_recompiler/backend/spirv/emit_spirv_instructions.h(+7 -14)📝
src/shader_recompiler/backend/spirv/spirv_emit_context.cpp(+105 -22)📝
src/shader_recompiler/backend/spirv/spirv_emit_context.h(+15 -3)📝
src/shader_recompiler/frontend/translate/scalar_memory.cpp(+9 -8)📝
src/shader_recompiler/frontend/translate/translate.cpp(+39 -2)📝
src/shader_recompiler/frontend/translate/translate.h(+6 -0)📝
src/shader_recompiler/frontend/translate/vector_alu.cpp(+42 -1)📝
src/shader_recompiler/frontend/translate/vector_memory.cpp(+17 -10)📝
src/shader_recompiler/ir/attribute.cpp(+2 -0)...and 28 more files
📄 Description
Recompiler can now read sampled images. Images and samplers are separated as it better matches how guest hardware works with separate T# and S#. The idea is the same as buffers, the resource tracking pass finds any image instructions and patches it to the correct binding and resolves certain parameters like texture coordinates and lod bias.
Tiled textures are not supported atm so only linear were tested. For texture tiling we will probably use freegnm gpuaddr library as a basis, though pal gpuaddr seems a bit more complete.
This PR also fixes the embedded vertex shader to work correctly when used and have correct alignment. Blending support has been added based on the register configuration as well as a few depth formats. Finally I've added a config to dump both binary gcn shaders and generated spirv shaders which can be quite useful for debugging.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.