SoftGPU: Fix crash on matrix load.

Just stubbing the draw engine here.
This commit is contained in:
Unknown W. Brackets 2017-04-15 19:53:56 -07:00
parent dfed20701a
commit 31ddcd48ed

View file

@ -34,6 +34,7 @@
#include "GPU/Software/SoftGpu.h"
#include "GPU/Software/TransformUnit.h"
#include "GPU/Software/Rasterizer.h"
#include "GPU/Common/DrawEngineCommon.h"
#include "GPU/Common/FramebufferCommon.h"
const int FB_WIDTH = 480;
@ -54,6 +55,16 @@ static Draw::SamplerState *samplerLinear = nullptr;
static Draw::Buffer *vdata = nullptr;
static Draw::Buffer *idata = nullptr;
class SoftwareDrawEngine : public DrawEngineCommon {
public:
virtual void DispatchFlush() {
}
virtual void DispatchSubmitPrim(void *verts, void *inds, GEPrimitiveType prim, int vertexCount, u32 vertType, int *bytesRead) {
TransformUnit::SubmitPrimitive(verts, inds, prim, vertexCount, vertType, bytesRead);
}
};
SoftGPU::SoftGPU(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
: GPUCommon(gfxCtx, draw)
{
@ -102,6 +113,8 @@ SoftGPU::SoftGPU(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
displayFramebuf_ = 0;
displayStride_ = 512;
displayFormat_ = GE_FORMAT_8888;
drawEngineCommon_ = new SoftwareDrawEngine();
}
void SoftGPU::DeviceLost() {