5#include <unordered_map>
30#define SCREEN_WIDTH 320
31#define SCREEN_HEIGHT 240
70enum class ShaderOpts {
92#define SHADER_OPT(opt) ((uint64_t)(1 << static_cast<int>(ShaderOpts::opt)))
95struct ColorCombinerKey {
96 uint64_t combine_mode;
101 auto operator<=>(
const ColorCombinerKey&)
const =
default;
105#define SHADER_MAX_TEXTURES 6
106#define SHADER_FIRST_TEXTURE 0
107#define SHADER_FIRST_MASK_TEXTURE 2
108#define SHADER_FIRST_REPLACEMENT_TEXTURE 4
114 bool opt_texture_edge;
117 bool opt_alpha_threshold;
121 bool usedTextures[2];
126 bool do_single[2][2];
127 bool do_multiply[2][2];
129 bool color_alpha_same[2];
139class GfxRenderingAPI;
140class GfxWindowBackend;
198 uintptr_t addr = (uintptr_t)key.texture_addr;
199 return (
size_t)(addr ^ (addr >> 5));
204typedef std::unordered_map<TextureCacheKey, struct TextureCacheValue, TextureCacheKey::Hasher>
TextureCacheMap;
216 TextureCacheMap::iterator
it;
238#define MAX_VERTICES 64
302 uint32_t line_size_bytes;
345 std::list<TextureCacheMapIter>
lru;
385 uint32_t width, uint32_t height, uint32_t posX, uint32_t posY,
386 std::shared_ptr<Ship::ConsoleVariable> consoleVariable =
nullptr,
387 std::shared_ptr<Ship::ResourceManager> resourceManager =
nullptr);
393 void GetDimensions(uint32_t* width, uint32_t* height, int32_t* posX, int32_t* posY);
397 void Run(Gfx* commands,
const std::unordered_map<Mtx*, MtxF>& mtx_replacements);
405 int CreateFrameBuffer(uint32_t width, uint32_t height, uint32_t native_width, uint32_t native_height,
406 uint8_t resize,
bool forceFixedAspect =
false);
408 void CopyFrameBuffer(
int fb_dst_id,
int fb_src_id,
bool copyOnce,
bool* hasCopiedPtr);
462 void GfxSpTri1(uint8_t vtx1Idx, uint8_t vtx2Idx, uint8_t vtx3Idx,
bool isRect);
469 void GfxSpTexture(uint16_t sc, uint16_t tc, uint8_t level, uint8_t tile, uint8_t on);
470 void GfxDpSetScissor(uint32_t mode, uint32_t ulx, uint32_t uly, uint32_t lrx, uint32_t lry);
471 void GfxDpSetTextureImage(uint32_t format, uint32_t size, uint32_t width,
const char* texPath, uint32_t texFlags,
473 void GfxDpSetTile(uint8_t fmt, uint32_t siz, uint32_t line, uint32_t tmem, uint8_t tile, uint32_t palette,
474 uint32_t cmt, uint32_t maskt, uint32_t shiftt, uint32_t cms, uint32_t masks, uint32_t shifts);
475 void GfxDpSetTileSize(uint8_t tile, uint16_t uls, uint16_t ult, uint16_t lrs, uint16_t lrt);
477 void GfxDpLoadBlock(uint8_t tile, uint32_t uls, uint32_t ult, uint32_t lrs, uint32_t dxt);
478 void GfxDpLoadTile(uint8_t tile, uint32_t uls, uint32_t ult, uint32_t lrs, uint32_t lrt);
488 int16_t ult, int16_t dsdx, int16_t dtdy,
bool flip);
489 void GfxDpImageRectangle(int32_t tile, int32_t w, int32_t h, int32_t ulx, int32_t uly, int16_t uls, int16_t ult,
490 int32_t lrx, int32_t lry, int16_t lrs, int16_t lrt);
502 uint32_t nativeHeight)
const;
516 static void MatrixMul(
float res[4][4],
const float a[4][4],
const float b[4][4]);
592 uint8_t resize,
bool forceFixedAspect =
false);
Definition gfx_rendering_api.h:30
Definition gfx_window_manager_api.h:7
Definition interpreter.h:379
size_t mShadersIndex
Definition interpreter.h:572
void GfxSpMovewordF3d(uint8_t index, uint16_t offset, uintptr_t data)
void GfxDpImageRectangle(int32_t tile, int32_t w, int32_t h, int32_t ulx, int32_t uly, int16_t uls, int16_t ult, int32_t lrx, int32_t lry, int16_t lrs, int16_t lrt)
void GfxDpTextureRectangle(int32_t ulx, int32_t uly, int32_t lrx, int32_t lry, uint8_t tile, int16_t uls, int16_t ult, int16_t dsdx, int16_t dtdy, bool flip)
uintptr_t mGfxFrameBuffer
Definition interpreter.h:537
void GfxDpSetFogColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
void ImportTextureRaw(int tile, bool importReplacement)
void GetCurDimensions(uint32_t *width, uint32_t *height)
std::map< int, FBInfo > mFrameBuffers
Definition interpreter.h:556
bool mDroppedFrame
Definition interpreter.h:540
size_t mBufVboNumTris
Definition interpreter.h:543
void GfxSpTri1(uint8_t vtx1Idx, uint8_t vtx2Idx, uint8_t vtx3Idx, bool isRect)
bool mResolvedResourceCacheEnabled
Definition interpreter.h:524
void GfxSpExtraGeometryMode(uint32_t clear, uint32_t set)
std::stack< ShaderId > mShaderStack
Definition interpreter.h:571
void GfxDpSetTile(uint8_t fmt, uint32_t siz, uint32_t line, uint32_t tmem, uint8_t tile, uint32_t palette, uint32_t cmt, uint32_t maskt, uint32_t shiftt, uint32_t cms, uint32_t masks, uint32_t shifts)
void GetDimensions(uint32_t *width, uint32_t *height, int32_t *posX, int32_t *posY)
static void NormalizeVector(float v[3])
void GfxDrawRectangle(int32_t ulx, int32_t uly, int32_t lrx, int32_t lry)
void CalcAndSetViewport(const F3DVp_t *viewport)
void SetTargetFps(int fps)
static const char * ACMUXtoStr(uint32_t acmux)
GfxDimensions mCurDimensions
Definition interpreter.h:532
void Gfxs2dexBg1cyc(F3DuObjBg *bg)
std::shared_ptr< Ship::ResourceManager > mResourceManager
Cached ResourceManager, set in Init().
Definition interpreter.h:547
GfxRenderingAPI * mRapi
Definition interpreter.h:545
void RegisterFbTexture(const void *cpuAddr, int fbId)
void GfxDpSetColorImage(uint32_t format, uint32_t size, uint32_t width, void *address)
GfxRenderingAPI * GetCurrentRenderingAPI()
GfxDimensions mPrvDimensions
Definition interpreter.h:533
bool mFbActive
Definition interpreter.h:553
static std::shared_ptr< Fast3dWindow > GetCurrentWindow()
GfxTextureCache mTextureCache
Definition interpreter.h:522
static void GenerateCC(ColorCombiner *comb, const ColorCombinerKey &key)
void SetGfxDebugger(std::shared_ptr< GfxDebugger > debugger)
RenderingState mRenderingState
Definition interpreter.h:520
void GfxDpSetPrimColor(uint8_t m, uint8_t r, uint8_t l, uint8_t g, uint8_t b, uint8_t a)
float mInterpolationT
Definition interpreter.h:578
void ImportTextureMask(int i, int tile)
bool mRendersToFb
Definition interpreter.h:554
void ImportTextureI4(int tile, bool importReplacement)
std::shared_ptr< Ship::ConsoleVariable > mConsoleVariable
Cached ConsoleVariable, set in Init().
Definition interpreter.h:548
void GfxDpLoadTile(uint8_t tile, uint32_t uls, uint32_t ult, uint32_t lrs, uint32_t lrt)
void GfxDpSetCombineMode(uint32_t rgb, uint32_t alpha, uint32_t rgb_cyc2, uint32_t alpha_cyc2)
void SetNativeDimensions(float width, float height)
void GfxDpSetFillColor(uint32_t pickedColor)
void CalculateNormalDir(const F3DLight_t *, float coeffs[3])
std::weak_ptr< Fast3dWindow > mFast3dWindow
Cached Fast3dWindow, set in OnInit().
Definition interpreter.h:549
void ImportTextureCi8(int tile, bool importReplacement)
XYWidthHeight mGameWindowViewport
Definition interpreter.h:534
void CopyFrameBuffer(int fb_dst_id, int fb_src_id, bool copyOnce, bool *hasCopiedPtr)
size_t ShaderId
Definition interpreter.h:570
void Run(Gfx *commands, const std::unordered_map< Mtx *, MtxF > &mtx_replacements)
static void TransposedMatrixMul(float res[3], const float a[3], const float b[4][4])
void ImportTextureImg(int tile, bool importReplacement)
void ImportTextureCi4(int tile, bool importReplacement)
void GfxSpVertex(size_t numVertices, size_t destIndex, const F3DVtx *vertices)
std::unordered_map< std::pair< float, float >, uint16_t, hash_pair_ff > mGetPixelDepthCached
Definition interpreter.h:562
void Gfxs2dexBgCopy(F3DuObjBg *bg)
void GfxSpMovewordF3dex2(uint8_t index, uint16_t offset, uintptr_t data)
void GfxDpSetEnvColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
void GfxSpModifyVertex(uint16_t vtxIdx, uint8_t where, uint32_t val)
int mInterpolationIndex
Definition interpreter.h:573
void GfxSpPopMatrix(uint32_t count)
GfxDimensions mGfxCurrentWindowDimensions
Definition interpreter.h:529
void GfxDpFillRectangle(int32_t ulx, int32_t uly, int32_t lrx, int32_t lry)
ShaderProgram * LookupOrCreateShaderProgram(uint64_t id0, uint64_t id1)
size_t mBufVboLen
Definition interpreter.h:542
int CreateFrameBuffer(uint32_t width, uint32_t height, uint32_t native_width, uint32_t native_height, uint8_t resize, bool forceFixedAspect=false)
GfxWindowBackend * mWapi
Definition interpreter.h:544
void UnregisterFbTexture(const void *cpuAddr)
void Init(GfxWindowBackend *wapi, class GfxRenderingAPI *rapi, const char *game_name, bool start_in_fullscreen, uint32_t width, uint32_t height, uint32_t posX, uint32_t posY, std::shared_ptr< Ship::ConsoleVariable > consoleVariable=nullptr, std::shared_ptr< Ship::ResourceManager > resourceManager=nullptr)
int mInterpolationIndexTarget
Definition interpreter.h:574
void AdjustVIewportOrScissor(XYWidthHeight *area)
bool TextureCacheLookup(int i, const TextureCacheKey &key)
int mGameFbMsaaResolved
Definition interpreter.h:559
void AdjustWidthHeightForScale(uint32_t &width, uint32_t &height, uint32_t nativeWidth, uint32_t nativeHeight) const
void SetFrameBuffer(int fb, float noiseScale)
void ImportTextureI8(int tile, bool importReplacement)
void SetResolutionMultiplier(float multiplier)
void GfxDpSetScissor(uint32_t mode, uint32_t ulx, uint32_t uly, uint32_t lrx, uint32_t lry)
void GfxSpGeometryMode(uint32_t clear, uint32_t set)
void RegisterBlendedTexture(const char *name, uint8_t *mask, uint8_t *replacement)
int32_t mCurWindowPosX
Definition interpreter.h:530
void GfxDpSetGrayscaleColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
void GfxDpSetZImage(void *zBufAddr)
void ImportTextureIA4(int tile, bool importReplacement)
void GfxDpSetTileSize(uint8_t tile, uint16_t uls, uint16_t ult, uint16_t lrs, uint16_t lrt)
float AdjXForAspectRatio(float x) const
void GfxSpTexture(uint16_t sc, uint16_t tc, uint8_t level, uint8_t tile, uint8_t on)
bool mMarkerOn
Definition interpreter.h:567
int32_t mCurWindowPosY
Definition interpreter.h:531
bool ViewportMatchesRendererResolution()
std::set< std::pair< float, float > > mGetPixelDepthPending
Definition interpreter.h:561
void Gfxs2dexRecyCopy(F3DuObjSprite *spr)
void SetMaxFrameLatency(int latency)
XYWidthHeight mNativeDimensions
Definition interpreter.h:535
void SetMsaaLevel(uint32_t level)
unsigned int mMsaaLevel
Definition interpreter.h:539
XYWidthHeight mPrevNativeDimensions
Definition interpreter.h:536
void ImportTextureRgba32(int tile, bool importReplacement)
static void MatrixMul(float res[4][4], const float a[4][4], const float b[4][4])
static std::string_view GetBaseTexturePath(std::string_view path)
uint16_t GetPixelDepth(float x, float y)
RSP * mRsp
Definition interpreter.h:518
void HandleWindowEvents()
void UnregisterBlendedTexture(const char *name)
void GfxDpLoadTlut(uint8_t tile, uint32_t high_index)
void GfxDpSetBlendColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
ColorCombiner * LookupOrCreateColorCombiner(const ColorCombinerKey &key)
const std::unordered_map< Mtx *, MtxF > * mCurMtxReplacements
Definition interpreter.h:566
void * SegAddr(uintptr_t w1)
std::map< ColorCombinerKey, ColorCombiner >::iterator mPrevCombiner
Definition interpreter.h:526
int mGameFb
Definition interpreter.h:558
std::shared_ptr< GfxDebugger > GetGfxDebugger() const
uint8_t * mTexUploadBuffer
Definition interpreter.h:527
void SetResolvedResourceCacheEnabled(bool enabled)
std::unordered_map< size_t, const char * > mShaders
Definition interpreter.h:568
void SetFast3dWindow(std::shared_ptr< Fast3dWindow > window)
void GetPixelDepthPrepare(float x, float y)
void ImportTextureRgba16(int tile, bool importReplacement)
std::unordered_map< uintptr_t, int > mFbTextures
Definition interpreter.h:564
std::map< std::string, MaskedTextureEntry, std::less<> > mMaskedTextures
Definition interpreter.h:563
void GfxDpSetTextureImage(uint32_t format, uint32_t size, uint32_t width, const char *texPath, uint32_t texFlags, RawTexMetadata rawTexMetdata, const void *addr)
void ImportTextureIA16(int tile, bool importReplacement)
std::map< int, FBInfo >::iterator mActiveFrameBuffer
Definition interpreter.h:555
void ImportTextureIA8(int tile, bool importReplacement)
void ImportTexture(int i, int tile, bool importReplacement)
void TextureCacheDelete(const uint8_t *origAddr)
std::map< ColorCombinerKey, ColorCombiner > mColorCombinerPool
Definition interpreter.h:525
void AdjustPixelDepthCoordinates(float &x, float &y)
void GfxDpSetOtherMode(uint32_t h, uint32_t l)
void GfxSpMatrix(uint8_t params, const int32_t *addr)
RDP * mRdp
Definition interpreter.h:519
std::unordered_map< const void *, std::shared_ptr< Ship::IResource > > mResolvedResourceCache
Definition interpreter.h:523
std::shared_ptr< Ship::IResource > ResolveResourceCached(const char *path)
float * mBufVbo
Definition interpreter.h:541
uintptr_t mSegmentPointers[MAX_SEGMENT_POINTERS]
Definition interpreter.h:551
void GfxSpMovememF3dex2(uint8_t index, uint8_t offset, const void *data)
std::shared_ptr< GfxDebugger > mGfxDebugger
Definition interpreter.h:546
void GfxSpSetOtherMode(uint32_t shift, uint32_t num_bits, uint64_t mode)
void GfxSpMovememF3d(uint8_t index, uint8_t offset, const void *data)
void GfxDpLoadBlock(uint8_t tile, uint32_t uls, uint32_t ult, uint32_t lrs, uint32_t dxt)
static const char * CCMUXtoStr(uint32_t ccmux)
#define MAX_VERTICES
Definition interpreter.h:238
void gfx_shader_cache_clear()
void gfx_cc_get_features(uint64_t shader_id0, uint64_t shader_id1, struct CCFeatures *cc_features)
void gfx_texture_cache_clear()
@ SHADER_TEXEL0A
Definition interpreter.h:61
@ SHADER_INPUT_2
Definition interpreter.h:54
@ SHADER_INPUT_1
Definition interpreter.h:53
@ SHADER_TEXEL0
Definition interpreter.h:60
@ SHADER_INPUT_3
Definition interpreter.h:55
@ SHADER_1
Definition interpreter.h:64
@ SHADER_INPUT_5
Definition interpreter.h:57
@ SHADER_INPUT_4
Definition interpreter.h:56
@ SHADER_INPUT_7
Definition interpreter.h:59
@ SHADER_INPUT_6
Definition interpreter.h:58
@ SHADER_COMBINED
Definition interpreter.h:65
@ SHADER_TEXEL1A
Definition interpreter.h:63
@ SHADER_0
Definition interpreter.h:52
@ SHADER_TEXEL1
Definition interpreter.h:62
@ SHADER_NOISE
Definition interpreter.h:66
#define MAX_LIGHTS
Definition interpreter.h:237
int gfx_create_framebuffer(uint32_t width, uint32_t height, uint32_t native_width, uint32_t native_height, uint8_t resize, bool forceFixedAspect=false)
#define SHADER_MAX_TEXTURES
Definition interpreter.h:105
Definition gfx_direct3d_common.h:19
void gfx_set_target_ucode(UcodeHandlers ucode)
const char * gfx_get_shader(int16_t id)
Attribute
Definition interpreter.h:329
@ MTX_LOAD
Definition interpreter.h:331
@ CULL_BACK
Definition interpreter.h:335
@ CULL_BOTH
Definition interpreter.h:336
@ MTX_PROJECTION
Definition interpreter.h:330
@ MV_VIEWPORT
Definition interpreter.h:337
@ MTX_NOPUSH
Definition interpreter.h:333
@ MV_LIGHT
Definition interpreter.h:338
@ MTX_PUSH
Definition interpreter.h:332
@ CULL_FRONT
Definition interpreter.h:334
GfxExecStack g_exec_stack
std::unordered_map< TextureCacheKey, struct TextureCacheValue, TextureCacheKey::Hasher > TextureCacheMap
Definition interpreter.h:204
int32_t gfx_check_image_signature(const char *imgData)
const char * GfxGetOpcodeName(int8_t opcode)
constexpr size_t SHADER_ID_SHIFT
Definition interpreter.h:144
constexpr size_t MAX_SEGMENT_POINTERS
Definition interpreter.h:143
TextureType
Definition Texture.h:11
void gfx_push_current_dir(char *path)
constexpr int16_t ShaderIdUnmask(int id)
Definition interpreter.h:145
std::pair< const TextureCacheKey, struct TextureCacheValue > TextureCacheNode
Definition interpreter.h:205
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
Definition interpreter.h:349
struct ShaderProgram * prg[16]
Definition interpreter.h:353
uint64_t shader_id1
Definition interpreter.h:351
uint8_t shader_input_mapping[2][7]
Definition interpreter.h:354
uint64_t shader_id0
Definition interpreter.h:350
bool usedTextures[2]
Definition interpreter.h:352
Definition lus_gbi.h:1047
Definition interpreter.h:366
uint32_t native_height
Definition interpreter.h:369
uint32_t orig_width
Definition interpreter.h:367
uint32_t applied_width
Definition interpreter.h:368
uint32_t native_width
Definition interpreter.h:369
bool forceFixedAspect
Definition interpreter.h:371
bool resize
Definition interpreter.h:370
uint32_t orig_height
Definition interpreter.h:367
uint32_t applied_height
Definition interpreter.h:368
Definition interpreter.h:181
uint32_t height
Definition interpreter.h:183
float aspect_ratio
Definition interpreter.h:184
float internal_mul
Definition interpreter.h:182
uint32_t width
Definition interpreter.h:183
Definition interpreter.h:158
int line
Definition interpreter.h:160
const char * file
Definition interpreter.h:159
Definition interpreter.h:149
std::stack< F3DGfx * > cmd_stack
Definition interpreter.h:151
void start(F3DGfx *dlist)
void openDisp(const char *file, int line)
void call(F3DGfx *caller, F3DGfx *callee)
const std::vector< CodeDisp > & getDisp() const
std::vector< const F3DGfx * > gfx_path
Definition interpreter.h:157
std::vector< CodeDisp > disp_stack
Definition interpreter.h:163
void branch(F3DGfx *caller)
Definition interpreter.h:343
std::list< TextureCacheMapIter > lru
Definition interpreter.h:345
std::vector< uint32_t > free_texture_ids
Definition interpreter.h:346
TextureCacheMap map
Definition interpreter.h:344
Definition interpreter.h:223
float x
Definition interpreter.h:224
struct RGBA color
Definition interpreter.h:226
float u
Definition interpreter.h:225
float y
Definition interpreter.h:224
float w
Definition interpreter.h:224
uint8_t clip_rej
Definition interpreter.h:227
float z
Definition interpreter.h:224
float v
Definition interpreter.h:225
Definition interpreter.h:374
uint8_t * mask
Definition interpreter.h:375
uint8_t * replacementData
Definition interpreter.h:376
Definition interpreter.h:267
uint8_t prim_lod_fraction
Definition interpreter.h:314
uint32_t size_bytes
Definition interpreter.h:286
const uint8_t * palette_dram_addr[2]
Definition interpreter.h:271
uint8_t masks
Definition interpreter.h:298
struct RawTexMetadata raw_tex_metadata
Definition interpreter.h:281
uint8_t fmt
Definition interpreter.h:295
struct Fast::RDP::@8 texture_to_load
struct XYWidthHeight viewport scissor
Definition interpreter.h:323
struct Fast::RDP::@10 texture_tile[8]
uint32_t width
Definition interpreter.h:279
uint8_t siz
Definition interpreter.h:278
uint8_t cms
Definition interpreter.h:297
bool viewport_or_scissor_changed
Definition interpreter.h:324
void * z_buf_address
Definition interpreter.h:325
float lrs
Definition interpreter.h:300
void * color_image_address
Definition interpreter.h:326
struct Fast::RDP::@9 loaded_texture[2]
uint32_t orig_size_bytes
Definition interpreter.h:285
uint8_t shifts
Definition interpreter.h:299
bool grayscale
Definition interpreter.h:312
bool masked
Definition interpreter.h:291
uint16_t tmem
Definition interpreter.h:301
bool textures_changed[2]
Definition interpreter.h:306
uint32_t line_size_bytes
Definition interpreter.h:288
uint8_t first_tile_index
Definition interpreter.h:308
struct RGBA env_color prim_color fog_color blend_color fill_color grayscale_color
Definition interpreter.h:316
int16_t convert_k[6]
Definition interpreter.h:321
uint32_t other_mode_l
Definition interpreter.h:310
uint8_t tmem_index
Definition interpreter.h:304
uint32_t tex_flags
Definition interpreter.h:280
struct RGBA key_center
Definition interpreter.h:319
uint16_t prim_depth
Definition interpreter.h:315
const uint8_t * addr
Definition interpreter.h:277
struct RGBA key_scale
Definition interpreter.h:320
uint64_t combine_mode
Definition interpreter.h:311
uint32_t full_image_line_size_bytes
Definition interpreter.h:287
bool blended
Definition interpreter.h:292
uint8_t palette_staging[2][256]
Definition interpreter.h:275
uint8_t palette
Definition interpreter.h:303
const uint8_t * palettes[2]
Definition interpreter.h:268
uint32_t other_mode_h
Definition interpreter.h:310
Definition interpreter.h:219
uint8_t a
Definition interpreter.h:220
uint8_t g
Definition interpreter.h:220
uint8_t r
Definition interpreter.h:220
uint8_t b
Definition interpreter.h:220
Definition interpreter.h:240
struct Fast::RSP::@7 texture_scaling_factor
float current_lookat_coeffs[2][3]
Definition interpreter.h:250
float current_lights_coeffs[MAX_LIGHTS][3]
Definition interpreter.h:249
uint16_t t
Definition interpreter.h:261
float P_matrix[4][4]
Definition interpreter.h:245
F3DLight_t lookat[2]
Definition interpreter.h:247
F3DLight current_lights[MAX_LIGHTS+1]
Definition interpreter.h:248
int16_t fog_mul
Definition interpreter.h:255
float MP_matrix[4][4]
Definition interpreter.h:244
uint8_t current_num_lights
Definition interpreter.h:251
uint32_t geometry_mode
Definition interpreter.h:254
uint32_t extra_geometry_mode
Definition interpreter.h:257
struct LoadedVertex loaded_vertices[MAX_VERTICES+4]
Definition interpreter.h:264
float modelview_matrix_stack[11][4][4]
Definition interpreter.h:241
uint8_t modelview_matrix_stack_size
Definition interpreter.h:242
uint16_t s
Definition interpreter.h:261
bool lights_changed
Definition interpreter.h:252
int16_t fog_offset
Definition interpreter.h:255
Definition interpreter.h:357
bool alpha_blend
Definition interpreter.h:360
struct XYWidthHeight viewport scissor
Definition interpreter.h:361
bool decal_mode
Definition interpreter.h:359
struct ShaderProgram * mShaderProgram
Definition interpreter.h:362
uint8_t depth_test_and_mask
Definition interpreter.h:358
TextureCacheNode * mTextures[SHADER_MAX_TEXTURES]
Definition interpreter.h:363
OpenGL shader program metadata cached by the Fast3D renderer.
Definition gfx_opengl.h:40
Definition interpreter.h:196
size_t operator()(const TextureCacheKey &key) const noexcept
Definition interpreter.h:197
Definition interpreter.h:187
uint32_t size_bytes
Definition interpreter.h:192
uint8_t palette_index
Definition interpreter.h:191
bool operator==(const TextureCacheKey &) const noexcept=default
const uint8_t * palette_addrs[2]
Definition interpreter.h:189
const uint8_t * texture_addr
Definition interpreter.h:188
uint8_t fmt
Definition interpreter.h:190
uint8_t siz
Definition interpreter.h:190
Definition interpreter.h:215
TextureCacheMap::iterator it
Definition interpreter.h:216
Definition interpreter.h:207
uint8_t cmt
Definition interpreter.h:209
uint32_t texture_id
Definition interpreter.h:208
std::list< structTextureCacheMapIter >::iterator lru_location
Definition interpreter.h:212
uint8_t cms
Definition interpreter.h:209
bool linear_filter
Definition interpreter.h:210
Definition interpreter.h:176
uint32_t width
Definition interpreter.h:178
int16_t y
Definition interpreter.h:177
int16_t x
Definition interpreter.h:177
uint32_t height
Definition interpreter.h:178
Definition gfx_rendering_api.h:20
UcodeHandlers
Definition ucodehandlers.h:3
Definition lus_gbi.h:1175
Definition lus_gbi.h:1076
Definition lus_gbi.h:1256
Definition lus_gbi.h:1285