mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-18 18:26:27 +01:00
small commit to try to fix issue 1509
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5460 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
866e127510
commit
3ff6a8bd68
@ -403,6 +403,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
|
|||||||
int gl_format = 0;
|
int gl_format = 0;
|
||||||
int gl_iformat = 0;
|
int gl_iformat = 0;
|
||||||
int gl_type = 0;
|
int gl_type = 0;
|
||||||
|
GL_REPORT_ERRORD();
|
||||||
if (dfmt != PC_TEX_FMT_DXT1)
|
if (dfmt != PC_TEX_FMT_DXT1)
|
||||||
{
|
{
|
||||||
switch (dfmt)
|
switch (dfmt)
|
||||||
@ -490,6 +491,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
|
|||||||
width, height, 0, expandedWidth*expandedHeight/2, temp);
|
width, height, 0, expandedWidth*expandedHeight/2, temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
GL_REPORT_ERRORD();
|
||||||
if(TexLevels > 1 && dfmt != PC_TEX_FMT_NONE)
|
if(TexLevels > 1 && dfmt != PC_TEX_FMT_NONE)
|
||||||
{
|
{
|
||||||
int level = 1;
|
int level = 1;
|
||||||
|
@ -54,7 +54,7 @@ static u16 *TIBuffer;
|
|||||||
static u16 *LIBuffer;
|
static u16 *LIBuffer;
|
||||||
static u16 *PIBuffer;
|
static u16 *PIBuffer;
|
||||||
static GLint max_Index_size = 0;
|
static GLint max_Index_size = 0;
|
||||||
#define MAXVBUFFERSIZE 0x50000
|
#define MAXVBUFFERSIZE 0x1FFFF
|
||||||
#define MAXIBUFFERSIZE 0xFFFF
|
#define MAXIBUFFERSIZE 0xFFFF
|
||||||
#define MAXVBOBUFFERCOUNT 0x8
|
#define MAXVBOBUFFERCOUNT 0x8
|
||||||
|
|
||||||
@ -79,10 +79,6 @@ bool Init()
|
|||||||
s_pCurBufferPointer = LocalVBuffer;
|
s_pCurBufferPointer = LocalVBuffer;
|
||||||
s_nCurVBOIndex = 0;
|
s_nCurVBOIndex = 0;
|
||||||
glGenBuffers(ARRAYSIZE(s_vboBuffers), s_vboBuffers);
|
glGenBuffers(ARRAYSIZE(s_vboBuffers), s_vboBuffers);
|
||||||
for (u32 i = 0; i < ARRAYSIZE(s_vboBuffers); ++i) {
|
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, s_vboBuffers[i]);
|
|
||||||
glBufferData(GL_ARRAY_BUFFER, MAXVBUFFERSIZE, NULL, GL_STREAM_DRAW);
|
|
||||||
}
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
g_nativeVertexFmt = NULL;
|
g_nativeVertexFmt = NULL;
|
||||||
Flushed=false;
|
Flushed=false;
|
||||||
@ -148,6 +144,7 @@ void AddVertices(int primitive, int numvertices)
|
|||||||
{
|
{
|
||||||
if (numvertices <= 0)
|
if (numvertices <= 0)
|
||||||
return;
|
return;
|
||||||
|
GL_REPORT_ERROR();
|
||||||
switch (primitive)
|
switch (primitive)
|
||||||
{
|
{
|
||||||
case GX_DRAW_QUADS:
|
case GX_DRAW_QUADS:
|
||||||
@ -235,13 +232,12 @@ void Flush()
|
|||||||
|
|
||||||
DVSTARTPROFILE();
|
DVSTARTPROFILE();
|
||||||
|
|
||||||
GL_REPORT_ERRORD();
|
GL_REPORT_ERROR();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, s_vboBuffers[s_nCurVBOIndex]);
|
glBindBuffer(GL_ARRAY_BUFFER, s_vboBuffers[s_nCurVBOIndex]);
|
||||||
glBufferData(GL_ARRAY_BUFFER, s_pCurBufferPointer - LocalVBuffer, NULL, GL_STREAM_COPY);
|
glBufferData(GL_ARRAY_BUFFER, s_pCurBufferPointer - LocalVBuffer, LocalVBuffer, GL_STREAM_DRAW);
|
||||||
glBufferSubData(GL_ARRAY_BUFFER,0, s_pCurBufferPointer - LocalVBuffer, LocalVBuffer);
|
|
||||||
GL_REPORT_ERRORD();
|
GL_REPORT_ERRORD();
|
||||||
|
|
||||||
// setup the pointers
|
// setup the pointers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user