mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 04:51:41 +00:00
- Hooking the new RGB256k drawer to triangle drawer in place of RGB32k.
This commit is contained in:
parent
978152f483
commit
5ffee5231f
5 changed files with 6 additions and 6 deletions
|
@ -247,7 +247,7 @@ struct TriDrawTriangleArgs
|
|||
uint8_t stencilWriteValue;
|
||||
uint32_t *subsectorGBuffer;
|
||||
const uint8_t *colormaps;
|
||||
const uint8_t *RGB32k;
|
||||
const uint8_t *RGB256k;
|
||||
const uint8_t *BaseColors;
|
||||
};
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ void PolyTriangleDrawer::draw_arrays(const PolyDrawArgs &drawargs, WorkerThreadD
|
|||
args.stencilMasks = PolyStencilBuffer::Instance()->Masks();
|
||||
args.subsectorGBuffer = PolySubsectorGBuffer::Instance()->Values();
|
||||
args.colormaps = drawargs.colormaps;
|
||||
args.RGB32k = RGB32k.All;
|
||||
args.RGB256k = RGB256k.All;
|
||||
args.BaseColors = (const uint8_t *)GPalette.BaseColors;
|
||||
|
||||
bool ccw = drawargs.ccw;
|
||||
|
|
|
@ -492,7 +492,7 @@ SSAInt DrawTriangleCodegen::ToPal8(SSAVec4i c)
|
|||
SSAInt red = SSAInt::clamp(c[0], SSAInt(0), SSAInt(255));
|
||||
SSAInt green = SSAInt::clamp(c[1], SSAInt(0), SSAInt(255));
|
||||
SSAInt blue = SSAInt::clamp(c[2], SSAInt(0), SSAInt(255));
|
||||
return RGB32k[((blue >> 3) * 32 + (green >> 3)) * 32 + (red >> 3)].load(true).zext_int();
|
||||
return RGB256k[((blue >> 2) * 64 + (green >> 2)) * 64 + (red >> 2)].load(true).zext_int();
|
||||
}
|
||||
|
||||
SSAInt DrawTriangleCodegen::ProcessPixel8(SSAInt bg, SSAInt *varying)
|
||||
|
@ -631,7 +631,7 @@ void DrawTriangleCodegen::LoadArgs(SSAValue args, SSAValue thread_data)
|
|||
if (!truecolor)
|
||||
{
|
||||
Colormaps = args[0][20].load(true);
|
||||
RGB32k = args[0][21].load(true);
|
||||
RGB256k = args[0][21].load(true);
|
||||
BaseColors = args[0][22].load(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ private:
|
|||
SSABool is_fixed_light;
|
||||
|
||||
SSAUBytePtr Colormaps;
|
||||
SSAUBytePtr RGB32k;
|
||||
SSAUBytePtr RGB256k;
|
||||
SSAUBytePtr BaseColors;
|
||||
|
||||
SSAInt numSpans;
|
||||
|
|
|
@ -430,7 +430,7 @@ llvm::Type *LLVMDrawers::GetTriDrawTriangleArgs(llvm::LLVMContext &context)
|
|||
elements.push_back(llvm::Type::getInt8Ty(context)); // uint8_t stencilWriteValue;
|
||||
elements.push_back(llvm::Type::getInt32PtrTy(context)); // uint32_t *subsectorGBuffer;
|
||||
elements.push_back(llvm::Type::getInt8PtrTy(context)); // const uint8_t *colormaps;
|
||||
elements.push_back(llvm::Type::getInt8PtrTy(context)); // const uint8_t *RGB32k;
|
||||
elements.push_back(llvm::Type::getInt8PtrTy(context)); // const uint8_t *RGB256k;
|
||||
elements.push_back(llvm::Type::getInt8PtrTy(context)); // const uint8_t *BaseColors;
|
||||
TriDrawTriangleArgs = llvm::StructType::create(context, elements, "TriDrawTriangle", false)->getPointerTo();
|
||||
return TriDrawTriangleArgs;
|
||||
|
|
Loading…
Reference in a new issue