Skip to content

Commit c44b4c0

Browse files
committed
baseVertex fix
1 parent 1a66d3f commit c44b4c0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/FNA3D_Driver_SDL.c

+11
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,9 @@ typedef struct SDLGPU_Renderer
11941194
MOJOSHADER_effect *currentEffect;
11951195
const MOJOSHADER_effectTechnique *currentTechnique;
11961196
uint32_t currentPass;
1197+
1198+
/* Capabilities */
1199+
uint8_t supportsBaseVertex;
11971200
} SDLGPU_Renderer;
11981201

11991202
/* Statics */
@@ -2247,6 +2250,11 @@ static void SDLGPU_ApplyVertexBufferBindings(
22472250
int32_t i, bindingsIndex;
22482251
uint32_t hash;
22492252

2253+
if (renderer->supportsBaseVertex)
2254+
{
2255+
baseVertex = 0;
2256+
}
2257+
22502258
/* link/compile shader program if it hasn't been yet */
22512259
if (!MOJOSHADER_sdlCheckProgramStatus(renderer->mojoshaderContext))
22522260
{
@@ -4102,6 +4110,9 @@ static FNA3D_Device* SDLGPU_CreateDevice(
41024110
NULL
41034111
);
41044112

4113+
/* FIXME: moltenVK fix */
4114+
renderer->supportsBaseVertex = 1;
4115+
41054116
/* Acquire command buffer, we are ready for takeoff */
41064117

41074118
SDLGPU_ResetCommandBufferState(renderer);

0 commit comments

Comments
 (0)