mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 22:47:03 +00:00
rsx: Async shader compilation
- Defer compilation process to worker threads - vulkan: Fixup for graphics_pipeline_state. Never use struct assignment operator on vk** structs due to padding after sType member (4 bytes)
This commit is contained in:
parent
ac99fd764d
commit
e7f30640ef
21 changed files with 585 additions and 128 deletions
|
|
@ -326,20 +326,20 @@ size_t fragment_program_utils::get_fragment_program_ucode_size(void *ptr)
|
|||
fragment_program_utils::fragment_program_metadata fragment_program_utils::analyse_fragment_program(void *ptr)
|
||||
{
|
||||
const qword *instBuffer = (const qword*)ptr;
|
||||
size_t instIndex = 0;
|
||||
s32 index = 0;
|
||||
s32 program_offset = -1;
|
||||
u32 ucode_size = 0;
|
||||
u16 textures_mask = 0;
|
||||
|
||||
while (true)
|
||||
{
|
||||
const qword& inst = instBuffer[instIndex];
|
||||
const qword& inst = instBuffer[index];
|
||||
const u32 opcode = (inst.word[0] >> 16) & 0x3F;
|
||||
|
||||
if (opcode)
|
||||
{
|
||||
if (program_offset < 0)
|
||||
program_offset = instIndex * 16;
|
||||
program_offset = index * 16;
|
||||
|
||||
switch(opcode)
|
||||
{
|
||||
|
|
@ -362,7 +362,7 @@ fragment_program_utils::fragment_program_metadata fragment_program_utils::analys
|
|||
if (is_constant(inst.word[1]) || is_constant(inst.word[2]) || is_constant(inst.word[3]))
|
||||
{
|
||||
//Instruction references constant, skip one slot occupied by data
|
||||
instIndex++;
|
||||
index++;
|
||||
ucode_size += 16;
|
||||
}
|
||||
}
|
||||
|
|
@ -376,14 +376,14 @@ fragment_program_utils::fragment_program_metadata fragment_program_utils::analys
|
|||
{
|
||||
if (program_offset < 0)
|
||||
{
|
||||
program_offset = instIndex * 16;
|
||||
program_offset = index * 16;
|
||||
ucode_size = 16;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
instIndex++;
|
||||
index++;
|
||||
}
|
||||
|
||||
return{ (u32)program_offset, ucode_size, textures_mask };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue