From 31ddcd48ed67c88bec39e0d34baba80809f6753e Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 15 Apr 2017 19:53:56 -0700 Subject: [PATCH] SoftGPU: Fix crash on matrix load. Just stubbing the draw engine here. --- GPU/Software/SoftGpu.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/GPU/Software/SoftGpu.cpp b/GPU/Software/SoftGpu.cpp index 35f0348128..1907994fe9 100644 --- a/GPU/Software/SoftGpu.cpp +++ b/GPU/Software/SoftGpu.cpp @@ -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() {