GPU: Reset hw transform once per frame.
Might prevent potential crashes if it changes mid-frame.
This commit is contained in:
parent
30ede8240c
commit
46b9454e73
2 changed files with 6 additions and 1 deletions
|
@ -37,6 +37,7 @@ DrawEngineCommon::DrawEngineCommon() : decoderMap_(16) {
|
||||||
decJitCache_ = new VertexDecoderJitCache();
|
decJitCache_ = new VertexDecoderJitCache();
|
||||||
transformed = (TransformedVertex *)AllocateMemoryPages(TRANSFORMED_VERTEX_BUFFER_SIZE, MEM_PROT_READ | MEM_PROT_WRITE);
|
transformed = (TransformedVertex *)AllocateMemoryPages(TRANSFORMED_VERTEX_BUFFER_SIZE, MEM_PROT_READ | MEM_PROT_WRITE);
|
||||||
transformedExpanded = (TransformedVertex *)AllocateMemoryPages(3 * TRANSFORMED_VERTEX_BUFFER_SIZE, MEM_PROT_READ | MEM_PROT_WRITE);
|
transformedExpanded = (TransformedVertex *)AllocateMemoryPages(3 * TRANSFORMED_VERTEX_BUFFER_SIZE, MEM_PROT_READ | MEM_PROT_WRITE);
|
||||||
|
useHWTransform_ = g_Config.bHardwareTransform;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawEngineCommon::~DrawEngineCommon() {
|
DrawEngineCommon::~DrawEngineCommon() {
|
||||||
|
@ -171,6 +172,8 @@ void DrawEngineCommon::Resized() {
|
||||||
});
|
});
|
||||||
decoderMap_.Clear();
|
decoderMap_.Clear();
|
||||||
ClearTrackedVertexArrays();
|
ClearTrackedVertexArrays();
|
||||||
|
|
||||||
|
useHWTransform_ = g_Config.bHardwareTransform;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 DrawEngineCommon::NormalizeVertices(u8 *outPtr, u8 *bufPtr, const u8 *inPtr, int lowerBound, int upperBound, u32 vertType, int *vertexSize) {
|
u32 DrawEngineCommon::NormalizeVertices(u8 *outPtr, u8 *bufPtr, const u8 *inPtr, int lowerBound, int upperBound, u32 vertType, int *vertexSize) {
|
||||||
|
@ -738,7 +741,7 @@ void DrawEngineCommon::SubmitPrim(void *verts, void *inds, GEPrimitiveType prim,
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DrawEngineCommon::CanUseHardwareTransform(int prim) {
|
bool DrawEngineCommon::CanUseHardwareTransform(int prim) {
|
||||||
if (!g_Config.bHardwareTransform)
|
if (!useHWTransform_)
|
||||||
return false;
|
return false;
|
||||||
return !gstate.isModeThrough() && prim != GE_PRIM_RECTANGLES;
|
return !gstate.isModeThrough() && prim != GE_PRIM_RECTANGLES;
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,6 +131,8 @@ protected:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool useHWTransform_ = false;
|
||||||
|
|
||||||
// Vertex collector buffers
|
// Vertex collector buffers
|
||||||
u8 *decoded = nullptr;
|
u8 *decoded = nullptr;
|
||||||
u16 *decIndex = nullptr;
|
u16 *decIndex = nullptr;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue