Skip to content

Commit

Permalink
Adding other missing values
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtrujy committed Aug 14, 2023
1 parent 4fed37b commit 91be9b2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions ee/gs/include/gsInit.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,27 @@
((u64)(GS_XYZ2) << 24) | \
((u64)(GIF_NOP) << 28);

/// Textured Sprite Goraud Primitive GIFTAG
#define GIF_TAG_SPRITE_GORAUD_TEXTURED(NLOOP) \
((u64)(NLOOP) << 0) | \
((u64)(1) << 15) | \
((u64)(0) << 46) | \
((u64)(0) << 47) | \
((u64)(1) << 58) | \
((u64)(9) << 60);

/// Textured Sprite Primitive UV REGLIST
#define GIF_TAG_SPRITE_GORAUD_TEXTURED_UV_REGS(ctx) \
((u64)(GS_TEX0_1 + ctx) << 0) | \
((u64)(GS_PRIM) << 4) | \
((u64)(GS_RGBAQ) << 8) | \
((u64)(GS_UV) << 12) | \
((u64)(GS_XYZ2) << 16) | \
((u64)(GS_RGBAQ) << 20) | \
((u64)(GS_UV) << 24) | \
((u64)(GS_XYZ2) << 28) | \
((u64)(GIF_NOP) << 32);

// Textured Triangle Primitive
/// Textured Triangle Primitive GIFTAG
#define GIF_TAG_TRIANGLE_TEXTURED(NLOOP) \
Expand Down Expand Up @@ -521,6 +542,7 @@
((u64)(0) << 47) | \
((u64)(1) << 58) | \
((u64)(12) << 60);

/// Textured Triangle Goraud Primitive REGLIST
#define GIF_TAG_TRIANGLE_GORAUD_TEXTURED_REGS(ctx) \
((u64)(GS_TEX0_1 + ctx) << 0) | \
Expand Down
4 changes: 2 additions & 2 deletions ee/gs/src/gsTexture.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,8 @@ void gskit_prim_list_sprite_texture_uv_3d(GSGLOBAL *gsGlobal, const GSTEXTURE *T

if(p_store == gsGlobal->CurQueue->last_tag)
{
*p_data++ = GIF_TAG_SPRITE_TEXTURED(count - 1);
*p_data++ = GIF_TAG_SPRITE_TEXTURED(gsGlobal->PrimContext);
*p_data++ = GIF_TAG_SPRITE_GORAUD_TEXTURED(count - 1);
*p_data++ = GIF_TAG_SPRITE_GORAUD_TEXTURED_UV_REGS(gsGlobal->PrimContext);
}

if(Texture->VramClut == 0)
Expand Down

0 comments on commit 91be9b2

Please sign in to comment.