Lines Matching refs:v
136 static void currentColor(ogles_context_t* c, GLfixed* v, const GLvoid*) { in currentColor() argument
137 memcpy(v, c->current.color.v, sizeof(vec4_t)); in currentColor()
139 static void currentColor_clamp(ogles_context_t* c, GLfixed* v, const GLvoid*) { in currentColor_clamp() argument
140 memcpy(v, c->currentColorClamped.v, sizeof(vec4_t)); in currentColor_clamp()
142 static void currentNormal(ogles_context_t* c, GLfixed* v, const GLvoid*) { in currentNormal() argument
143 memcpy(v, c->currentNormal.v, sizeof(vec3_t)); in currentNormal()
145 static void currentTexCoord(ogles_context_t* c, GLfixed* v, const GLvoid*) { in currentTexCoord() argument
146 memcpy(v, c->current.texture[c->arrays.tmu].v, sizeof(vec4_t)); in currentTexCoord()
152 static void fetch2b(ogles_context_t*, GLfixed* v, const GLbyte* p) { in fetch2b() argument
153 v[0] = gglIntToFixed(p[0]); in fetch2b()
154 v[1] = gglIntToFixed(p[1]); in fetch2b()
156 static void fetch2s(ogles_context_t*, GLfixed* v, const GLshort* p) { in fetch2s() argument
157 v[0] = gglIntToFixed(p[0]); in fetch2s()
158 v[1] = gglIntToFixed(p[1]); in fetch2s()
160 static void fetch2x(ogles_context_t*, GLfixed* v, const GLfixed* p) { in fetch2x() argument
161 memcpy(v, p, 2*sizeof(GLfixed)); in fetch2x()
163 static void fetch2f(ogles_context_t*, GLfixed* v, const GLfloat* p) { in fetch2f() argument
164 v[0] = gglFloatToFixed(p[0]); in fetch2f()
165 v[1] = gglFloatToFixed(p[1]); in fetch2f()
167 static void fetch3b(ogles_context_t*, GLfixed* v, const GLbyte* p) { in fetch3b() argument
168 v[0] = gglIntToFixed(p[0]); in fetch3b()
169 v[1] = gglIntToFixed(p[1]); in fetch3b()
170 v[2] = gglIntToFixed(p[2]); in fetch3b()
172 static void fetch3s(ogles_context_t*, GLfixed* v, const GLshort* p) { in fetch3s() argument
173 v[0] = gglIntToFixed(p[0]); in fetch3s()
174 v[1] = gglIntToFixed(p[1]); in fetch3s()
175 v[2] = gglIntToFixed(p[2]); in fetch3s()
177 static void fetch3x(ogles_context_t*, GLfixed* v, const GLfixed* p) { in fetch3x() argument
178 memcpy(v, p, 3*sizeof(GLfixed)); in fetch3x()
180 static void fetch3f(ogles_context_t*, GLfixed* v, const GLfloat* p) { in fetch3f() argument
181 v[0] = gglFloatToFixed(p[0]); in fetch3f()
182 v[1] = gglFloatToFixed(p[1]); in fetch3f()
183 v[2] = gglFloatToFixed(p[2]); in fetch3f()
185 static void fetch4b(ogles_context_t*, GLfixed* v, const GLbyte* p) { in fetch4b() argument
186 v[0] = gglIntToFixed(p[0]); in fetch4b()
187 v[1] = gglIntToFixed(p[1]); in fetch4b()
188 v[2] = gglIntToFixed(p[2]); in fetch4b()
189 v[3] = gglIntToFixed(p[3]); in fetch4b()
191 static void fetch4s(ogles_context_t*, GLfixed* v, const GLshort* p) { in fetch4s() argument
192 v[0] = gglIntToFixed(p[0]); in fetch4s()
193 v[1] = gglIntToFixed(p[1]); in fetch4s()
194 v[2] = gglIntToFixed(p[2]); in fetch4s()
195 v[3] = gglIntToFixed(p[3]); in fetch4s()
197 static void fetch4x(ogles_context_t*, GLfixed* v, const GLfixed* p) { in fetch4x() argument
198 memcpy(v, p, 4*sizeof(GLfixed)); in fetch4x()
200 static void fetch4f(ogles_context_t*, GLfixed* v, const GLfloat* p) { in fetch4f() argument
201 v[0] = gglFloatToFixed(p[0]); in fetch4f()
202 v[1] = gglFloatToFixed(p[1]); in fetch4f()
203 v[2] = gglFloatToFixed(p[2]); in fetch4f()
204 v[3] = gglFloatToFixed(p[3]); in fetch4f()
206 static void fetchExpand4ub(ogles_context_t*, GLfixed* v, const GLubyte* p) { in fetchExpand4ub() argument
207 v[0] = GGL_UB_TO_X(p[0]); in fetchExpand4ub()
208 v[1] = GGL_UB_TO_X(p[1]); in fetchExpand4ub()
209 v[2] = GGL_UB_TO_X(p[2]); in fetchExpand4ub()
210 v[3] = GGL_UB_TO_X(p[3]); in fetchExpand4ub()
212 static void fetchClamp4x(ogles_context_t*, GLfixed* v, const GLfixed* p) { in fetchClamp4x() argument
213 v[0] = gglClampx(p[0]); in fetchClamp4x()
214 v[1] = gglClampx(p[1]); in fetchClamp4x()
215 v[2] = gglClampx(p[2]); in fetchClamp4x()
216 v[3] = gglClampx(p[3]); in fetchClamp4x()
218 static void fetchClamp4f(ogles_context_t*, GLfixed* v, const GLfloat* p) { in fetchClamp4f() argument
219 v[0] = gglClampx(gglFloatToFixed(p[0])); in fetchClamp4f()
220 v[1] = gglClampx(gglFloatToFixed(p[1])); in fetchClamp4f()
221 v[2] = gglClampx(gglFloatToFixed(p[2])); in fetchClamp4f()
222 v[3] = gglClampx(gglFloatToFixed(p[3])); in fetchClamp4f()
224 static void fetchExpand3ub(ogles_context_t*, GLfixed* v, const GLubyte* p) { in fetchExpand3ub() argument
225 v[0] = GGL_UB_TO_X(p[0]); in fetchExpand3ub()
226 v[1] = GGL_UB_TO_X(p[1]); in fetchExpand3ub()
227 v[2] = GGL_UB_TO_X(p[2]); in fetchExpand3ub()
228 v[3] = 0x10000; in fetchExpand3ub()
230 static void fetchClamp3x(ogles_context_t*, GLfixed* v, const GLfixed* p) { in fetchClamp3x() argument
231 v[0] = gglClampx(p[0]); in fetchClamp3x()
232 v[1] = gglClampx(p[1]); in fetchClamp3x()
233 v[2] = gglClampx(p[2]); in fetchClamp3x()
234 v[3] = 0x10000; in fetchClamp3x()
236 static void fetchClamp3f(ogles_context_t*, GLfixed* v, const GLfloat* p) { in fetchClamp3f() argument
237 v[0] = gglClampx(gglFloatToFixed(p[0])); in fetchClamp3f()
238 v[1] = gglClampx(gglFloatToFixed(p[1])); in fetchClamp3f()
239 v[2] = gglClampx(gglFloatToFixed(p[2])); in fetchClamp3f()
240 v[3] = 0x10000; in fetchClamp3f()
242 static void fetchExpand3b(ogles_context_t*, GLfixed* v, const GLbyte* p) { in fetchExpand3b() argument
243 v[0] = GGL_B_TO_X(p[0]); in fetchExpand3b()
244 v[1] = GGL_B_TO_X(p[1]); in fetchExpand3b()
245 v[2] = GGL_B_TO_X(p[2]); in fetchExpand3b()
247 static void fetchExpand3s(ogles_context_t*, GLfixed* v, const GLshort* p) { in fetchExpand3s() argument
248 v[0] = GGL_S_TO_X(p[0]); in fetchExpand3s()
249 v[1] = GGL_S_TO_X(p[1]); in fetchExpand3s()
250 v[2] = GGL_S_TO_X(p[2]); in fetchExpand3s()
380 vertex_t* v = vBuffer; in clear() local
383 v->mru = 0; in clear()
384 v++; in clear()
391 vertex_t* v = vBuffer; in clear() local
394 v->index = 0; in clear()
395 v++; in clear()
453 vertex_t* cache_vertex(ogles_context_t* c, vertex_t* v, uint32_t index) in cache_vertex() argument
458 if (ggl_unlikely(v->locked)) { in cache_vertex()
467 v = c->vc.vBuffer + 2; in cache_vertex()
468 v += v[0].locked | (v[1].locked<<1); in cache_vertex()
471 c->arrays.compileElement(c, v, index); in cache_vertex()
472 v->locked = 1; in cache_vertex()
473 return v; in cache_vertex()
483 vertex_t* const v = c->vc.vCache + in fetch_vertex() local
486 if (ggl_likely(v->index == index)) { in fetch_vertex()
487 v->locked = 1; in fetch_vertex()
488 return v; in fetch_vertex()
490 return cache_vertex(c, v, index); in fetch_vertex()
494 vertex_t* v = c->vc.vCache + in fetch_vertex() local
498 if (ggl_likely(v[0].index == index)) { in fetch_vertex()
499 v[0].locked = 1; in fetch_vertex()
500 v[0].mru = 0; in fetch_vertex()
501 return &v[0]; in fetch_vertex()
504 if (ggl_likely(v[1].index == index)) { in fetch_vertex()
505 v[1].locked = 1; in fetch_vertex()
506 v[0].mru = 1; in fetch_vertex()
507 return &v[1]; in fetch_vertex()
510 const int lru = 1 - v[0].mru; in fetch_vertex()
511 v[0].mru = lru; in fetch_vertex()
512 return cache_vertex(c, &v[lru], index); in fetch_vertex()
517 vertex_t* v = c->vc.vBuffer + 2; in fetch_vertex() local
518 return cache_vertex(c, v, index); in fetch_vertex()
539 vertex_t* v = c->vc.vBuffer; in drawPrimitivesPoints() local
542 c->arrays.compileElements(c, v, first, num); in drawPrimitivesPoints()
548 const uint32_t cc = v[0].flags; in drawPrimitivesPoints()
550 c->prims.renderPoint(c, v); in drawPrimitivesPoints()
551 v++; in drawPrimitivesPoints()
565 vertex_t *v, *v0, *v1; in drawPrimitivesLineStrip() local
577 v = c->vc.vBuffer + 1; in drawPrimitivesLineStrip()
579 c->arrays.compileElements(c, v, first, num); in drawPrimitivesLineStrip()
585 v1 = v++; in drawPrimitivesLineStrip()
624 vertex_t* v = c->vc.vBuffer; in drawPrimitivesLines() local
627 c->arrays.compileElements(c, v, first, num); in drawPrimitivesLines()
634 const uint32_t cc = v[0].flags & v[1].flags; in drawPrimitivesLines()
636 c->prims.renderLine(c, v, v+1); in drawPrimitivesLines()
637 v += 2; in drawPrimitivesLines()
655 vertex_t *v, *v0, *v1, *v2; in drawPrimitivesTriangleFanOrStrip() local
671 v = c->vc.vBuffer + 2; in drawPrimitivesTriangleFanOrStrip()
673 c->arrays.compileElements(c, v, first, num); in drawPrimitivesTriangleFanOrStrip()
679 v2 = v++; in drawPrimitivesTriangleFanOrStrip()
720 vertex_t* v = c->vc.vBuffer; in drawPrimitivesTriangles() local
723 c->arrays.compileElements(c, v, first, num); in drawPrimitivesTriangles()
730 const uint32_t cc = v[0].flags & v[1].flags & v[2].flags; in drawPrimitivesTriangles()
732 c->prims.renderTriangle(c, v, v+1, v+2); in drawPrimitivesTriangles()
733 v += 3; in drawPrimitivesTriangles()
767 vertex_t * v = fetch_vertex(c, read_index(type, indices)); in drawIndexedPrimitivesPoints() local
768 if (ggl_likely(!(v->flags & vertex_t::CLIP_ALL))) in drawIndexedPrimitivesPoints()
769 c->prims.renderPoint(c, v); in drawIndexedPrimitivesPoints()
770 v->locked = 0; in drawIndexedPrimitivesPoints()
783 vertex_t * const v = c->vc.vBuffer; in drawIndexedPrimitivesLineStrip() local
784 vertex_t* v0 = v; in drawIndexedPrimitivesLineStrip()
810 vertex_t * const v = c->vc.vBuffer; in drawIndexedPrimitivesLineLoop() local
811 vertex_t* v0 = v; in drawIndexedPrimitivesLineLoop()
865 vertex_t * const v = c->vc.vBuffer; in drawIndexedPrimitivesTriangleFanOrStrip() local
866 vertex_t* v0 = v; in drawIndexedPrimitivesTriangleFanOrStrip()
867 vertex_t* v1 = v+1; in drawIndexedPrimitivesTriangleFanOrStrip()
948 vertex_t* v, GLint first) in compileElement__generic() argument
950 v->flags = 0; in compileElement__generic()
951 v->index = first; in compileElement__generic()
954 v->obj.z = 0; in compileElement__generic()
955 v->obj.w = 0x10000; in compileElement__generic()
956 c->arrays.vertex.fetch(c, v->obj.v, vp); in compileElement__generic()
957 c->arrays.mvp_transform(&c->transforms.mvp, &v->clip, &v->obj); in compileElement__generic()
958 c->arrays.perspective(c, v); in compileElement__generic()
962 vertex_t* v, GLint first, GLsizei count) in compileElements__generic() argument
969 v->flags = 0; in compileElements__generic()
970 v->index = first++; in compileElements__generic()
971 v->obj.z = 0; in compileElements__generic()
972 v->obj.w = 0x10000; in compileElements__generic()
973 c->arrays.vertex.fetch(c, v->obj.v, vp); in compileElements__generic()
974 c->arrays.mvp_transform(mvp, &v->clip, &v->obj); in compileElements__generic()
975 c->arrays.perspective(c, v); in compileElements__generic()
977 v++; in compileElements__generic()
1030 nv.v[i] = gglMulAddx(t, s.v[i] - p.v[i], p.v[i], 28); in clipVec4()