- merged gzdoom-gles2 and fixed some issues with pipeline size validation.
This commit is contained in:
parent
a8a5613675
commit
441cd0796f
116 changed files with 12502 additions and 80 deletions
|
|
@ -45,13 +45,20 @@ public:
|
|||
TArray<FFlatVertex> vbo_shadowdata;
|
||||
TArray<uint32_t> ibo_data;
|
||||
|
||||
IVertexBuffer *mVertexBuffer;
|
||||
int mPipelineNbr;
|
||||
int mPipelinePos = 0;
|
||||
|
||||
IVertexBuffer* mVertexBuffer;
|
||||
IVertexBuffer *mVertexBufferPipeline[HW_MAX_PIPELINE_BUFFERS];
|
||||
IIndexBuffer *mIndexBuffer;
|
||||
|
||||
|
||||
|
||||
unsigned int mIndex;
|
||||
std::atomic<unsigned int> mCurIndex;
|
||||
unsigned int mNumReserved;
|
||||
|
||||
unsigned int mMapStart;
|
||||
|
||||
static const unsigned int BUFFER_SIZE = 2000000;
|
||||
static const unsigned int BUFFER_SIZE_TO_USE = BUFFER_SIZE-500;
|
||||
|
|
@ -68,7 +75,7 @@ public:
|
|||
NUM_RESERVED = 20
|
||||
};
|
||||
|
||||
FFlatVertexBuffer(int width, int height);
|
||||
FFlatVertexBuffer(int width, int height, int pipelineNbr = 1);
|
||||
~FFlatVertexBuffer();
|
||||
|
||||
void OutputResized(int width, int height);
|
||||
|
|
@ -97,16 +104,40 @@ public:
|
|||
mCurIndex = mIndex;
|
||||
}
|
||||
|
||||
void NextPipelineBuffer()
|
||||
{
|
||||
mPipelinePos++;
|
||||
mPipelinePos %= mPipelineNbr;
|
||||
|
||||
mVertexBuffer = mVertexBufferPipeline[mPipelinePos];
|
||||
}
|
||||
|
||||
void Map()
|
||||
{
|
||||
mMapStart = mCurIndex;
|
||||
mVertexBuffer->Map();
|
||||
}
|
||||
|
||||
void Unmap()
|
||||
{
|
||||
mVertexBuffer->Unmap();
|
||||
mVertexBuffer->Upload(mMapStart * sizeof(FFlatVertex), (mCurIndex - mMapStart) * sizeof(FFlatVertex));
|
||||
}
|
||||
|
||||
void DropSync()
|
||||
{
|
||||
mVertexBuffer->GPUDropSync();
|
||||
}
|
||||
|
||||
void WaitSync()
|
||||
{
|
||||
mVertexBuffer->GPUWaitSync();
|
||||
}
|
||||
|
||||
int GetPipelinePos()
|
||||
{
|
||||
return mPipelinePos;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue