Home | History | Annotate | Download | only in Renderer

Lines Matching refs:state

34 		unsigned int *state = (unsigned int*)this;
39 hash ^= state[i];
45 SetupProcessor::State::State(int i)
47 memset(this, 0, sizeof(State));
50 bool SetupProcessor::State::operator==(const State &state) const
52 if(hash != state.hash)
57 return memcmp(static_cast<const States*>(this), static_cast<const States*>(&state), sizeof(States)) == 0;
72 SetupProcessor::State SetupProcessor::update() const
74 State state;
78 state.isDrawPoint = context->isDrawPoint(true);
79 state.isDrawLine = context->isDrawLine(true);
80 state.isDrawTriangle = context->isDrawTriangle(false);
81 state.isDrawSolidTriangle = context->isDrawTriangle(true);
82 state.interpolateZ = context->depthBufferActive() || context->pixelFogActive() != FOG_NONE || vPosZW;
83 state.interpolateW = context->perspectiveActive() || vPosZW;
84 state.perspective = context->perspectiveActive();
85 state.pointSprite = context->pointSpriteActive();
86 state.cullMode = context->cullMode;
87 state.twoSidedStencil = context->stencilActive() && context->twoSidedStencil;
88 state.slopeDepthBias = context->slopeDepthBias != 0.0f;
89 state.vFace = context->pixelShader && context->pixelShader->isVFaceDeclared();
91 state.positionRegister = Pos;
92 state.pointSizeRegister = Unused;
94 state.multiSample = context->getMultiSampleCount();
95 state.rasterizerDiscard = context->rasterizerDiscard;
99 state.positionRegister = context->vertexShader->getPositionRegister();
100 state.pointSizeRegister = context->vertexShader->getPointSizeRegister();
104 state.pointSizeRegister = Pts;
111 state.gradient[interpolant][component].attribute = Unused;
112 state.gradient[interpolant][component].flat = false;
113 state.gradient[interpolant][component].wrap = false;
117 state.fog.attribute = Unused;
118 state.fog.flat = false;
119 state.fog.wrap = false;
154 state.gradient[interpolant][component].attribute = input;
155 state.gradient[interpolant][component].flat = flat;
173 state.gradient[interpolant][component].attribute = T0 + semantic.index;
174 state.gradient[interpolant][component].flat = semantic.flat || (point && !sprite);
177 state.gradient[interpolant][component].attribute = C0 + semantic.index;
178 state.gradient[interpolant][component].flat = semantic.flat || flatShading;
194 state.texture[coordinate][component].attribute = T0 + coordinate;
195 state.texture[coordinate][component].flat = point && !sprite;
196 state.texture[coordinate][component].wrap = (context->textureWrap[coordinate] & (1 << component)) != 0;
207 state.color[color][component].attribute = C0 + color;
208 state.color[color][component].flat = flatShading;
217 state.fog.attribute = Fog;
218 state.fog.flat = point;
221 state.hash = state.computeHash();
223 return state;
226 Routine *SetupProcessor::routine(const State &state)
228 Routine *routine = routineCache->query(state);
232 SetupRoutine *generator = new SetupRoutine(state);
237 routineCache->add(state, routine);
246 routineCache = new RoutineCache<State>(clamp(cacheSize, 1, 65536), precacheSetup ? "sw-setup" : 0);