Update for latest vitaGL
This commit is contained in:
@@ -11,7 +11,7 @@ CC = $(PREFIX)-gcc
|
||||
CXX = $(PREFIX)-g++
|
||||
AR = $(PREFIX)-gcc-ar
|
||||
CFLAGS = -g -Wl,-q,--no-enum-size-warning -fno-short-enums -fno-optimize-sibling-calls -O3 -fsingle-precision-constant -mfloat-abi=hard -ffast-math \
|
||||
-DPSP2 -DNDEBUG -DRW_GL3 -DLIBRW_GLAD -Dmemcpy_neon=sceClibMemcpy
|
||||
-DPSP2 -DNDEBUG -DRW_GL3 -DLIBRW_GLAD -DPSP2_USE_SHADER_COMPILER -Dmemcpy_neon=sceClibMemcpy
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
|
||||
@@ -1536,11 +1536,8 @@ openGLFW(EngineOpenParams *openparams)
|
||||
}
|
||||
#ifdef PSP2_USE_SHADER_COMPILER
|
||||
vglSetupRuntimeShaderCompiler(SHARK_OPT_UNSAFE, SHARK_ENABLE, SHARK_ENABLE, SHARK_ENABLE);
|
||||
#else
|
||||
vglEnableRuntimeShaderCompiler(GL_FALSE);
|
||||
#endif
|
||||
vglInitExtended(0, 960, 544, 0x800000, SCE_GXM_MULTISAMPLE_4X);
|
||||
vglUseVram(GL_TRUE);
|
||||
makeVideoModeList();
|
||||
|
||||
return 1;
|
||||
|
||||
+4
-4
@@ -129,7 +129,7 @@ im2DRenderPrimitive(PrimitiveType primType, void *vertices, int32 numVertices)
|
||||
vglIndexPointerMapped(gConstIndices);
|
||||
gVertexBufferIm2D += numVertices*(sizeof(Im2DVertex)/sizeof(float));
|
||||
|
||||
vglDrawObjects(primTypeMap[primType], numVertices, GL_FALSE);
|
||||
vglDrawObjects(primTypeMap[primType], numVertices);
|
||||
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ im2DRenderIndexedPrimitive(PrimitiveType primType,
|
||||
vglVertexAttribPointerMapped(0, gVertexBufferIm2D);
|
||||
gVertexBufferIm2D += numVertices*(sizeof(Im2DVertex)/sizeof(float));
|
||||
|
||||
vglDrawObjects(primTypeMap[primType], numIndices, GL_FALSE);
|
||||
vglDrawObjects(primTypeMap[primType], numIndices);
|
||||
}
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ im3DRenderPrimitive(PrimitiveType primType)
|
||||
vglIndexPointerMapped(gConstIndices);
|
||||
vglVertexAttribPointerMapped(0, gVertexBufferIm3D);
|
||||
gVertexBufferIm3D += num3DVertices*(sizeof(Im3DVertex)/sizeof(float));
|
||||
vglDrawObjects(primTypeMap[primType], num3DVertices, GL_FALSE);
|
||||
vglDrawObjects(primTypeMap[primType], num3DVertices);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -255,7 +255,7 @@ im3DRenderIndexedPrimitive(PrimitiveType primType, void *indices, int32 numIndic
|
||||
vglVertexAttribPointerMapped(0, gVertexBufferIm3D);
|
||||
gVertexBufferIm3D += num3DVertices*(sizeof(Im3DVertex)/sizeof(float));
|
||||
gIndicesIm3D += numIndices;
|
||||
vglDrawObjects(primTypeMap[primType], numIndices, GL_FALSE);
|
||||
vglDrawObjects(primTypeMap[primType], numIndices);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -25,7 +25,7 @@ drawInst_simple(InstanceDataHeader *header, InstanceData *inst)
|
||||
{
|
||||
vglIndexPointerMapped((uint8_t*)header->indexBuffer + inst->offset);
|
||||
vglVertexAttribPointerMapped(0, header->vertexBuffer);
|
||||
vglDrawObjects(header->primType, inst->numIndex, GL_FALSE);
|
||||
vglDrawObjects(header->primType, inst->numIndex);
|
||||
}
|
||||
|
||||
// Emulate PS2 GS alpha test FB_ONLY case: failed alpha writes to frame- but not to depth buffer
|
||||
|
||||
+11
-2
@@ -105,10 +105,19 @@ char shader_source_buffer[16 * 1024];
|
||||
static int
|
||||
compileshader(GLenum type, const char **src, GLuint *shader)
|
||||
{
|
||||
GLint shdr = glCreateShader(type);
|
||||
#ifdef PSP2_USE_SHADER_COMPILER
|
||||
// vitaGL treats GL_VERTEX_SHADER/GL_FRAGMENT_SHADER as GLSL and runs its
|
||||
// translator over the source; the shaders below are Cg, so ask for the
|
||||
// Cg frontend explicitly.
|
||||
GLenum shdrtype = type == GL_VERTEX_SHADER ?
|
||||
GL_CG_VERTEX_SHADER_EXT : GL_CG_FRAGMENT_SHADER_EXT;
|
||||
#else
|
||||
GLenum shdrtype = type;
|
||||
#endif
|
||||
GLint shdr = glCreateShader(shdrtype);
|
||||
#ifdef PSP2_USE_SHADER_COMPILER
|
||||
GLint n;
|
||||
Glint success;
|
||||
GLint success;
|
||||
GLint len;
|
||||
char *log;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user