Commit 9dfb70f0 by Peter Collingbourne

Move the declaration of DrawCall after Renderer.

This allows compilers targeting the MS ABI to select the correct inheritance model for the member function pointer field DrawCall::setupPrimitives using the complete type of Renderer. It will allow us to enable the new Clang flag -fcomplete-member-pointers globally. Bug: chromium:847724 Change-Id: Ied5859ec2f5d38b3ccf51608527506caec53f470 Reviewed-on: https://swiftshader-review.googlesource.com/19068Tested-by: 's avatarPeter Collingbourne <pcc@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 45fcfe8b
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
namespace sw namespace sw
{ {
class Clipper; class Clipper;
struct DrawCall;
class PixelShader; class PixelShader;
class VertexShader; class VertexShader;
class SwiftConfig; class SwiftConfig;
struct Task; struct Task;
class Resource; class Resource;
class Renderer;
struct Constants; struct Constants;
enum TranscendentalPrecision enum TranscendentalPrecision
...@@ -202,55 +202,6 @@ namespace sw ...@@ -202,55 +202,6 @@ namespace sw
float4 a2c3; float4 a2c3;
}; };
struct DrawCall
{
DrawCall();
~DrawCall();
AtomicInt drawType;
AtomicInt batchSize;
Routine *vertexRoutine;
Routine *setupRoutine;
Routine *pixelRoutine;
VertexProcessor::RoutinePointer vertexPointer;
SetupProcessor::RoutinePointer setupPointer;
PixelProcessor::RoutinePointer pixelPointer;
int (Renderer::*setupPrimitives)(int batch, int count);
SetupProcessor::State setupState;
Resource *vertexStream[MAX_VERTEX_INPUTS];
Resource *indexBuffer;
Surface *renderTarget[RENDERTARGETS];
Surface *depthBuffer;
Surface *stencilBuffer;
Resource *texture[TOTAL_IMAGE_UNITS];
Resource* pUniformBuffers[MAX_UNIFORM_BUFFER_BINDINGS];
Resource* vUniformBuffers[MAX_UNIFORM_BUFFER_BINDINGS];
Resource* transformFeedbackBuffers[MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS];
unsigned int vsDirtyConstF;
unsigned int vsDirtyConstI;
unsigned int vsDirtyConstB;
unsigned int psDirtyConstF;
unsigned int psDirtyConstI;
unsigned int psDirtyConstB;
std::list<Query*> *queries;
AtomicInt clipFlags;
AtomicInt primitive; // Current primitive to enter pipeline
AtomicInt count; // Number of primitives to render
AtomicInt references; // Remaining references to this draw call, 0 when done drawing, -1 when resources unlocked and slot is free
DrawData *data;
};
struct Viewport struct Viewport
{ {
float x0; float x0;
...@@ -502,6 +453,55 @@ namespace sw ...@@ -502,6 +453,55 @@ namespace sw
Routine *setupRoutine; Routine *setupRoutine;
Routine *pixelRoutine; Routine *pixelRoutine;
}; };
struct DrawCall
{
DrawCall();
~DrawCall();
AtomicInt drawType;
AtomicInt batchSize;
Routine *vertexRoutine;
Routine *setupRoutine;
Routine *pixelRoutine;
VertexProcessor::RoutinePointer vertexPointer;
SetupProcessor::RoutinePointer setupPointer;
PixelProcessor::RoutinePointer pixelPointer;
int (Renderer::*setupPrimitives)(int batch, int count);
SetupProcessor::State setupState;
Resource *vertexStream[MAX_VERTEX_INPUTS];
Resource *indexBuffer;
Surface *renderTarget[RENDERTARGETS];
Surface *depthBuffer;
Surface *stencilBuffer;
Resource *texture[TOTAL_IMAGE_UNITS];
Resource* pUniformBuffers[MAX_UNIFORM_BUFFER_BINDINGS];
Resource* vUniformBuffers[MAX_UNIFORM_BUFFER_BINDINGS];
Resource* transformFeedbackBuffers[MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS];
unsigned int vsDirtyConstF;
unsigned int vsDirtyConstI;
unsigned int vsDirtyConstB;
unsigned int psDirtyConstF;
unsigned int psDirtyConstI;
unsigned int psDirtyConstB;
std::list<Query*> *queries;
AtomicInt clipFlags;
AtomicInt primitive; // Current primitive to enter pipeline
AtomicInt count; // Number of primitives to render
AtomicInt references; // Remaining references to this draw call, 0 when done drawing, -1 when resources unlocked and slot is free
DrawData *data;
};
} }
#endif // sw_Renderer_hpp #endif // sw_Renderer_hpp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment