Lines Matching refs:state

42     c->state.clear.dirty =  GGL_STENCIL_BUFFER_BIT |
45 c->state.clear.depth = FIXED_ONE;
99 const uint32_t l = c->state.scissor.left;
100 const uint32_t t = c->state.scissor.top;
101 uint32_t w = c->state.scissor.right - l;
102 uint32_t h = c->state.scissor.bottom - t;
108 if (c->state.buffers.color.format == 0)
111 if (c->state.buffers.depth.format == 0)
114 if (c->state.buffers.stencil.format == 0)
118 if (c->state.clear.dirty & GGL_COLOR_BUFFER_BIT) {
119 c->state.clear.dirty &= ~GGL_COLOR_BUFFER_BIT;
122 c->state.buffers.color.format,
123 gglFixedToIteratedColor(c->state.clear.r),
124 gglFixedToIteratedColor(c->state.clear.g),
125 gglFixedToIteratedColor(c->state.clear.b),
126 gglFixedToIteratedColor(c->state.clear.a));
128 c->state.clear.colorPacked = GGL_HOST_TO_RGBA(colorPacked);
130 const uint32_t packed = c->state.clear.colorPacked;
131 memset2d(c, c->state.buffers.color, packed, l, t, w, h);
134 if (c->state.clear.dirty & GGL_DEPTH_BUFFER_BIT) {
135 c->state.clear.dirty &= ~GGL_DEPTH_BUFFER_BIT;
136 uint32_t depth = fixedToZ(c->state.clear.depth);
137 c->state.clear.depthPacked = (depth<<16)|depth;
139 const uint32_t packed = c->state.clear.depthPacked;
140 memset2d(c, c->state.buffers.depth, packed, l, t, w, h);
150 c->state.clear.r = gglClampx(r);
151 c->state.clear.g = gglClampx(g);
152 c->state.clear.b = gglClampx(b);
153 c->state.clear.a = gglClampx(a);
154 c->state.clear.dirty |= GGL_COLOR_BUFFER_BIT;
160 c->state.clear.depth = gglClampx(depth);
161 c->state.clear.dirty |= GGL_DEPTH_BUFFER_BIT;
167 c->state.clear.stencil = s;
168 c->state.clear.dirty |= GGL_STENCIL_BUFFER_BIT;