Skip to content

Commit

Permalink
GS/HW: Initial work implementing RT in RT support
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed Jun 30, 2024
1 parent 5ff3592 commit 9f2e3c0
Show file tree
Hide file tree
Showing 7 changed files with 300 additions and 71 deletions.
4 changes: 2 additions & 2 deletions bin/resources/shaders/vulkan/tfx.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ vec4 ps_color()
vec4 T = sample_color(st);
#endif

#if PS_SHUFFLE && !PS_READ16_SRC && !PS_SHUFFLE_SAME
#if PS_SHUFFLE && !PS_READ16_SRC && !PS_SHUFFLE_SAME && !(PS_PROCESS_BA == SHUFFLE_READWRITE && PS_PROCESS_RG == SHUFFLE_READWRITE)
uvec4 denorm_c_before = uvec4(T);
#if (PS_PROCESS_BA & SHUFFLE_READ)
T.r = float((denorm_c_before.b << 3) & 0xF8);
Expand Down Expand Up @@ -1318,7 +1318,7 @@ void main()
ps_blend(C, alpha_blend);

#if PS_SHUFFLE
#if !PS_READ16_SRC && !PS_SHUFFLE_SAME
#if !PS_READ16_SRC && !PS_SHUFFLE_SAME && !(PS_PROCESS_BA == SHUFFLE_READWRITE && PS_PROCESS_RG == SHUFFLE_READWRITE)
uvec4 denorm_c_after = uvec4(C);
#if (PS_PROCESS_BA & SHUFFLE_READ)
C.b = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
Expand Down
3 changes: 2 additions & 1 deletion pcsx2/GS/GSState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,8 @@ void GSState::FlushPrim()
Console.Warning("GS: Possible invalid draw, Frame PSM %x ZPSM %x", m_context->FRAME.PSM, m_context->ZBUF.PSM);
}
#endif

// Update scissor, it may have been modified by a previous draw
m_env.CTXT[PRIM->CTXT].UpdateScissor();
m_vt.Update(m_vertex.buff, m_index.buff, m_vertex.tail, m_index.tail, GSUtil::GetPrimClass(PRIM->PRIM));

// Texel coordinate rounding
Expand Down
1 change: 1 addition & 0 deletions pcsx2/GS/GSState.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ class GSState : public GSAlignedClass<32>
bool m_texflush_flag = false;
bool m_isPackedUV_HackFlag = false;
bool m_channel_shuffle = false;
bool m_in_target_draw = false;
u8 m_scanmask_used = 0;
u32 m_dirty_gs_regs = 0;
int m_backed_up_ctx = 0;
Expand Down
Loading

0 comments on commit 9f2e3c0

Please sign in to comment.