mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
rsx/interpreter: Improve instruction accuracy
- Fix DIV instruction - Add EXP_TEX modifier - Implement WPOS register read - Swap 3D and Cubemap enums to match RSX ids - Adds two extra instruction classes: flow control and packing control - Implement remaining FP instructions with exception of the rare projected texture lookups - Fix typo causing output color index > 0 to not work - Fix KIL instruction - Implement conditional vertex program writes
This commit is contained in:
parent
fc5b4026e1
commit
2ed50ba263
9 changed files with 334 additions and 110 deletions
|
|
@ -95,8 +95,10 @@ namespace gl
|
|||
|
||||
if (rsx::method_registers.shader_control() & CELL_GCM_SHADER_CONTROL_DEPTH_EXPORT) opt |= program_common::interpreter::COMPILER_OPT_ENABLE_DEPTH_EXPORT;
|
||||
if (rsx::method_registers.shader_control() & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS) opt |= program_common::interpreter::COMPILER_OPT_ENABLE_F32_EXPORT;
|
||||
|
||||
if (rsx::method_registers.shader_control() & RSX_SHADER_CONTROL_USES_KIL) opt |= program_common::interpreter::COMPILER_OPT_ENABLE_KIL;
|
||||
if (metadata.referenced_textures_mask) opt |= program_common::interpreter::COMPILER_OPT_ENABLE_TEXTURES;
|
||||
if (metadata.has_branch_instructions) opt |= program_common::interpreter::COMPILER_OPT_ENABLE_FLOW_CTRL;
|
||||
if (metadata.has_pack_instructions) opt |= program_common::interpreter::COMPILER_OPT_ENABLE_PACKING;
|
||||
|
||||
if (auto it = m_program_cache.find(opt); it != m_program_cache.end()) [[likely]]
|
||||
{
|
||||
|
|
@ -250,6 +252,21 @@ namespace gl
|
|||
builder << "#define WITH_DEPTH_EXPORT\n";
|
||||
}
|
||||
|
||||
if (compiler_options & program_common::interpreter::COMPILER_OPT_ENABLE_FLOW_CTRL)
|
||||
{
|
||||
builder << "#define WITH_FLOW_CTRL\n";
|
||||
}
|
||||
|
||||
if (compiler_options & program_common::interpreter::COMPILER_OPT_ENABLE_PACKING)
|
||||
{
|
||||
builder << "#define WITH_PACKING\n";
|
||||
}
|
||||
|
||||
if (compiler_options & program_common::interpreter::COMPILER_OPT_ENABLE_KIL)
|
||||
{
|
||||
builder << "#define WITH_KIL\n";
|
||||
}
|
||||
|
||||
if (compiler_options & program_common::interpreter::COMPILER_OPT_ENABLE_TEXTURES)
|
||||
{
|
||||
builder << "#define WITH_TEXTURES\n\n";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue