mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Shrink the DeferredDrawcall struct, because why not. Assorted cleanup
This commit is contained in:
parent
24d674d2bc
commit
c9048c3748
6 changed files with 14 additions and 21 deletions
|
@ -129,6 +129,6 @@ protected:
|
|||
|
||||
private:
|
||||
DialogStatus status = SCE_UTILITY_STATUS_NONE;
|
||||
UtilityDialogType dialogType_;
|
||||
UtilityDialogType dialogType_ = UtilityDialogType::NONE;
|
||||
bool volatileLocked_ = false;
|
||||
};
|
||||
|
|
|
@ -285,9 +285,6 @@ struct SaveFileInfo
|
|||
|
||||
PPGeImage *texture = nullptr;
|
||||
|
||||
SaveFileInfo() {
|
||||
}
|
||||
|
||||
void DoState(PointerWrap &p);
|
||||
};
|
||||
|
||||
|
|
|
@ -701,12 +701,11 @@ void DrawEngineCommon::SubmitPrim(const void *verts, const void *inds, GEPrimiti
|
|||
DeferredDrawCall &dc = drawCalls[numDrawCalls];
|
||||
dc.verts = verts;
|
||||
dc.inds = inds;
|
||||
dc.vertexCount = vertexCount;
|
||||
dc.indexType = (vertTypeID & GE_VTYPE_IDX_MASK) >> GE_VTYPE_IDX_SHIFT;
|
||||
dc.prim = prim;
|
||||
dc.vertexCount = vertexCount;
|
||||
dc.uvScale = gstate_c.uv;
|
||||
dc.cullMode = cullMode;
|
||||
|
||||
dc.uvScale = gstate_c.uv;
|
||||
if (inds) {
|
||||
GetIndexBounds(inds, vertexCount, vertTypeID, &dc.indexLowerBound, &dc.indexUpperBound);
|
||||
} else {
|
||||
|
|
|
@ -165,10 +165,10 @@ protected:
|
|||
u32 vertexCount;
|
||||
u8 indexType;
|
||||
s8 prim;
|
||||
u8 cullMode;
|
||||
u16 indexLowerBound;
|
||||
u16 indexUpperBound;
|
||||
UVScale uvScale;
|
||||
int cullMode;
|
||||
};
|
||||
|
||||
enum { MAX_DEFERRED_DRAW_CALLS = 128 };
|
||||
|
|
|
@ -176,9 +176,6 @@ void PrintDecodedVertex(VertexReader &vtx) {
|
|||
printf("P: %f %f %f\n", pos[0], pos[1], pos[2]);
|
||||
}
|
||||
|
||||
VertexDecoder::VertexDecoder() : decoded_(nullptr), ptr_(nullptr), jitted_(0), jittedSize_(0) {
|
||||
}
|
||||
|
||||
void VertexDecoder::Step_WeightsU8() const
|
||||
{
|
||||
u8 *wt = (u8 *)(decoded_ + decFmt.w0off);
|
||||
|
|
|
@ -125,10 +125,13 @@ public:
|
|||
case DEC_FLOAT_3:
|
||||
{
|
||||
const float *f = (const float *)(data_ + decFmt_.posoff);
|
||||
memcpy(pos, f, 12);
|
||||
if (isThrough()) {
|
||||
pos[0] = f[0];
|
||||
pos[1] = f[1];
|
||||
if (!isThrough()) {
|
||||
pos[2] = f[2];
|
||||
} else {
|
||||
// Integer value passed in a float. Clamped to 0, 65535.
|
||||
const float z = (int)pos[2] * (1.0f / 65535.0f);
|
||||
const float z = (int)f[2] * (1.0f / 65535.0f);
|
||||
pos[2] = z > 1.0f ? 1.0f : (z < 0.0f ? 0.0f : z);
|
||||
}
|
||||
}
|
||||
|
@ -443,8 +446,6 @@ struct VertexDecoderOptions {
|
|||
|
||||
class VertexDecoder {
|
||||
public:
|
||||
VertexDecoder();
|
||||
|
||||
// A jit cache is not mandatory.
|
||||
void SetVertexType(u32 vtype, const VertexDecoderOptions &options, VertexDecoderJitCache *jitCache = nullptr);
|
||||
|
||||
|
@ -549,11 +550,10 @@ public:
|
|||
int ToString(char *output) const;
|
||||
|
||||
// Mutable decoder state
|
||||
mutable u8 *decoded_;
|
||||
mutable const u8 *ptr_;
|
||||
|
||||
JittedVertexDecoder jitted_;
|
||||
int32_t jittedSize_;
|
||||
mutable u8 *decoded_ = nullptr;
|
||||
mutable const u8 *ptr_ = nullptr;
|
||||
JittedVertexDecoder jitted_ = 0;
|
||||
int32_t jittedSize_ = 0;
|
||||
|
||||
// "Immutable" state, set at startup
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue