rsx: Fix build

This commit is contained in:
kd-11 2018-05-13 13:48:28 +03:00 committed by kd-11
parent ad108720fb
commit 4836a03a7d
3 changed files with 15 additions and 3 deletions

View File

@ -87,8 +87,9 @@ namespace rsx
const u32 program_offset = (shader_program & ~0x3);
const u32 addr = get_address(program_offset, program_location);
const u32 program_start = program_hash_util::fragment_program_utils::get_fragment_program_start(vm::base(addr));
const u32 ucode_size = program_hash_util::fragment_program_utils::get_fragment_program_ucode_size(vm::base(addr + program_start));
const auto program_info = program_hash_util::fragment_program_utils::analyse_fragment_program(vm::base(addr));
const u32 program_start = program_info.program_start_offset;
const u32 ucode_size = program_info.program_ucode_length;
frame_capture_data::memory_block block;
block.addr = addr;

View File

@ -129,6 +129,7 @@ fragment_program_utils::fragment_program_metadata fragment_program_utils::analys
const qword *instBuffer = (const qword*)ptr;
size_t instIndex = 0;
s32 program_offset = -1;
u32 ucode_size = 0;
u16 textures_mask = 0;
while (true)
@ -163,13 +164,22 @@ fragment_program_utils::fragment_program_metadata fragment_program_utils::analys
{
//Instruction references constant, skip one slot occupied by data
instIndex++;
ucode_size += 16;
}
}
if (program_offset >= 0)
{
ucode_size += 16;
}
if ((inst.word[0] >> 8) & 0x1)
{
if (program_offset < 0)
{
program_offset = instIndex * 16;
ucode_size = 16;
}
break;
}
@ -177,7 +187,7 @@ fragment_program_utils::fragment_program_metadata fragment_program_utils::analys
instIndex++;
}
return{ (u32)program_offset, textures_mask };
return{ (u32)program_offset, ucode_size, textures_mask };
}
size_t fragment_program_utils::get_fragment_program_ucode_hash(const RSXFragmentProgram& program)

View File

@ -51,6 +51,7 @@ namespace program_hash_util
struct fragment_program_metadata
{
u32 program_start_offset;
u32 program_ucode_length;
u16 referenced_textures_mask;
};