- enable the depth buffer
- support vid_scalefactor
This commit is contained in:
parent
48d2d423f6
commit
d724b623d1
5 changed files with 65 additions and 4 deletions
|
|
@ -52,6 +52,11 @@ bool PolyTriangleDrawer::IsBgra()
|
|||
return isBgraRenderTarget;
|
||||
}
|
||||
|
||||
void PolyTriangleDrawer::ClearDepth(const DrawerCommandQueuePtr &queue, float value)
|
||||
{
|
||||
queue->Push<PolyClearDepthCommand>(value);
|
||||
}
|
||||
|
||||
void PolyTriangleDrawer::ClearStencil(const DrawerCommandQueuePtr &queue, uint8_t value)
|
||||
{
|
||||
queue->Push<PolyClearStencilCommand>(value);
|
||||
|
|
@ -118,6 +123,25 @@ void PolyTriangleDrawer::DrawElements(const DrawerCommandQueuePtr &queue, const
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void PolyTriangleThreadData::ClearDepth(float value)
|
||||
{
|
||||
auto buffer = PolyZBuffer::Instance();
|
||||
int width = buffer->Width();
|
||||
int height = buffer->Height();
|
||||
float *data = buffer->Values();
|
||||
|
||||
int skip = skipped_by_thread(0);
|
||||
int count = count_for_thread(0, height);
|
||||
|
||||
data += skip * width;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
for (int x = 0; x < width; x++)
|
||||
data[x] = value;
|
||||
data += num_cores * width;
|
||||
}
|
||||
}
|
||||
|
||||
void PolyTriangleThreadData::ClearStencil(uint8_t value)
|
||||
{
|
||||
auto buffer = PolyStencilBuffer::Instance();
|
||||
|
|
@ -686,6 +710,17 @@ void PolySetModelVertexShaderCommand::Execute(DrawerThread *thread)
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PolyClearDepthCommand::PolyClearDepthCommand(float value) : value(value)
|
||||
{
|
||||
}
|
||||
|
||||
void PolyClearDepthCommand::Execute(DrawerThread *thread)
|
||||
{
|
||||
PolyTriangleThreadData::Get(thread)->ClearDepth(value);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PolyClearStencilCommand::PolyClearStencilCommand(uint8_t value) : value(value)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue