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