mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-18 09:24:58 +00:00
shader_recompiler: handle fetch shader address offsets (#538)
* shader_recompiler: handle fetch shader address offsets parse index & offset sgpr from fetch shader and propagate them to vkBindVertexBuffers * shader_recompiler: fix fetch_shader when offset is not present * video_core: propagate index/offset SGPRs to vkCmdDraw instead of offsetting the buffer address * video_core: add vertex_offset to non-indexed draw calls renamed fetch offset fields
This commit is contained in:
parent
208575d392
commit
9e4fc17e6c
5 changed files with 53 additions and 9 deletions
|
@ -346,7 +346,7 @@ void Translator::EmitFetch(const GcnInst& inst) {
|
|||
|
||||
// Parse the assembly to generate a list of attributes.
|
||||
u32 fetch_size{};
|
||||
const auto attribs = ParseFetchShader(code, &fetch_size);
|
||||
const auto fetch_data = ParseFetchShader(code, &fetch_size);
|
||||
|
||||
if (Config::dumpShaders()) {
|
||||
using namespace Common::FS;
|
||||
|
@ -359,7 +359,10 @@ void Translator::EmitFetch(const GcnInst& inst) {
|
|||
file.WriteRaw<u8>(code, fetch_size);
|
||||
}
|
||||
|
||||
for (const auto& attrib : attribs) {
|
||||
info.vertex_offset_sgpr = fetch_data.vertex_offset_sgpr;
|
||||
info.instance_offset_sgpr = fetch_data.instance_offset_sgpr;
|
||||
|
||||
for (const auto& attrib : fetch_data.attributes) {
|
||||
const IR::Attribute attr{IR::Attribute::Param0 + attrib.semantic};
|
||||
IR::VectorReg dst_reg{attrib.dest_vgpr};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue