mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 07:46:01 +03:00
[PR #145] [MERGED] video_core: Bringup some basic functionality #1335
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#1335
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/145
Author: @raphaelthegreat
Created: 5/24/2024
Status: ✅ Merged
Merged: 5/25/2024
Merged by: @raphaelthegreat
Base:
main← Head:quad-work📝 Commits (4)
08e1559video_core: Remove hack in rasterizer0eaa7d5shader_recompiler: Implement attribute loads/storesf480d09video_core: Add basic vertex, index buffer handling and pipeline caching898e821externals: Make xxhash lowercase📊 Changes
50 files changed (+1038 additions, -391 deletions)
View changed files
📝
.gitmodules(+3 -3)📝
CMakeLists.txt(+3 -0)📝
externals/CMakeLists.txt(+3 -3)📝
externals/xxhash(+0 -0)📝
src/core/memory.cpp(+93 -0)📝
src/core/memory.h(+24 -4)📝
src/main.cpp(+0 -1)📝
src/shader_recompiler/backend/spirv/emit_spirv.cpp(+3 -3)📝
src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp(+6 -11)📝
src/shader_recompiler/backend/spirv/emit_spirv_instructions.h(+3 -3)📝
src/shader_recompiler/backend/spirv/spirv_emit_context.cpp(+105 -4)📝
src/shader_recompiler/backend/spirv/spirv_emit_context.h(+9 -9)➕
src/shader_recompiler/frontend/fetch_shader.cpp(+83 -0)➕
src/shader_recompiler/frontend/fetch_shader.h(+21 -0)📝
src/shader_recompiler/frontend/structured_control_flow.cpp(+6 -7)📝
src/shader_recompiler/frontend/structured_control_flow.h(+2 -2)📝
src/shader_recompiler/frontend/translate/translate.cpp(+37 -4)📝
src/shader_recompiler/frontend/translate/translate.h(+7 -3)📝
src/shader_recompiler/frontend/translate/vector_alu.cpp(+2 -3)📝
src/shader_recompiler/frontend/translate/vector_interpolation.cpp(+3 -1)...and 30 more files
📄 Description
This expands on the previous PR that added shader recompiler and fixes a couple very basic things before we move on to resource management.
Removes a hack in DrawIndex that skipped the first draw. This was in place because the display buffer had not been created yet and the texture cache didn't have the ability to create render targets. Now can, using the color buffer parameters from registers.
Attribute handling has been added. It's not complete but I hope will handle most not complex cases just fine. Doesn't help that the pipeline is a bit complex. VS receives inputs from vertex buffers using the fetch shader which needs special handling. Since the pattern generated is quite predictable, I chose to parse it directly from GCN assembly and not convert it to IR. VS then exports attributes either in Position0/1/.. (this is for position and other special VS outputs like gl_PointSize or gl_ClipDistance) or in Param0/1/... From what I saw in renderdoc the driver might try to pack more than one attribute in a single "param" or split an attribute into two "params". Then on PS side, there is SPI_PS_INPUT_CNTL_[0-31] registers which define a mapping between "param" and "attr" used in vector interpolation instructions. Flat inputs appear to always set the FLAT_SHADE member so it should be easy to detect.
The IR constant folding pass is also able to detect fp16 pack -> unpack operations and eliminate them which is neat.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.