mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
Remove unused code
This commit is contained in:
parent
845bf93c95
commit
f8efe394cc
2 changed files with 4 additions and 1386 deletions
File diff suppressed because it is too large
Load diff
|
@ -20,9 +20,7 @@
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
#ifndef __R_POLY_TRIANGLE__
|
|
||||||
#define __R_POLY_TRIANGLE__
|
|
||||||
|
|
||||||
#include "r_triangle.h"
|
#include "r_triangle.h"
|
||||||
#include "r_data/r_translate.h"
|
#include "r_data/r_translate.h"
|
||||||
|
@ -100,52 +98,6 @@ private:
|
||||||
friend class DrawPolyTrianglesCommand;
|
friend class DrawPolyTrianglesCommand;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 8x8 block of stencil values, plus a mask indicating if values are the same for early out stencil testing
|
|
||||||
class PolyStencilBlock
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
PolyStencilBlock(int block, uint8_t *values, uint32_t *masks) : Values(values + block * 64), ValueMask(masks[block])
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void Set(int x, int y, uint8_t value)
|
|
||||||
{
|
|
||||||
if ((ValueMask & 0xffffff00) == 0xffffff00)
|
|
||||||
{
|
|
||||||
if ((ValueMask & 0xff) == value)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (int i = 0; i < 8 * 8; i++)
|
|
||||||
Values[i] = (ValueMask & 0xff);
|
|
||||||
ValueMask = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Values[x + y * 8] = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t Get(int x, int y) const
|
|
||||||
{
|
|
||||||
if (IsSingleValue())
|
|
||||||
return ValueMask & 0xff;
|
|
||||||
else
|
|
||||||
return Values[x + y * 8];
|
|
||||||
}
|
|
||||||
|
|
||||||
void Clear(uint8_t value)
|
|
||||||
{
|
|
||||||
ValueMask = 0xffffff00 | (uint32_t)value;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsSingleValue() const
|
|
||||||
{
|
|
||||||
return (ValueMask & 0xffffff00) == 0xffffff00;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
uint8_t *Values;
|
|
||||||
uint32_t &ValueMask;
|
|
||||||
};
|
|
||||||
|
|
||||||
class PolySubsectorGBuffer
|
class PolySubsectorGBuffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -193,8 +145,7 @@ public:
|
||||||
uint32_t *m = Masks();
|
uint32_t *m = Masks();
|
||||||
for (int i = 0; i < count; i++)
|
for (int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
PolyStencilBlock block(i, v, m);
|
m[i] = 0xffffff00 | stencil_value;
|
||||||
block.Clear(stencil_value);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,29 +159,12 @@ public:
|
||||||
private:
|
private:
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
|
|
||||||
|
// 8x8 blocks of stencil values, plus a mask for each block indicating if values are the same for early out stencil testing
|
||||||
std::vector<uint8_t> values;
|
std::vector<uint8_t> values;
|
||||||
std::vector<uint32_t> masks;
|
std::vector<uint32_t> masks;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 0
|
|
||||||
class ScreenPolyTriangleDrawer
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
static void draw(const TriDrawTriangleArgs *args, WorkerThreadData *thread);
|
|
||||||
static void fill(const TriDrawTriangleArgs *args, WorkerThreadData *thread);
|
|
||||||
|
|
||||||
static void stencil(const TriDrawTriangleArgs *args, WorkerThreadData *thread);
|
|
||||||
|
|
||||||
static void draw32(const TriDrawTriangleArgs *args, WorkerThreadData *thread);
|
|
||||||
static void drawsubsector32(const TriDrawTriangleArgs *args, WorkerThreadData *thread);
|
|
||||||
static void fill32(const TriDrawTriangleArgs *args, WorkerThreadData *thread);
|
|
||||||
|
|
||||||
private:
|
|
||||||
static float gradx(float x0, float y0, float x1, float y1, float x2, float y2, float c0, float c1, float c2);
|
|
||||||
static float grady(float x0, float y0, float x1, float y1, float x2, float y2, float c0, float c1, float c2);
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class DrawPolyTrianglesCommand : public DrawerCommand
|
class DrawPolyTrianglesCommand : public DrawerCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -244,5 +178,3 @@ private:
|
||||||
TriDrawVariant variant;
|
TriDrawVariant variant;
|
||||||
TriBlendMode blendmode;
|
TriBlendMode blendmode;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
Loading…
Reference in a new issue