Lines Matching refs:DST
192 #define ZERO_4V( DST ) (DST)[0] = (DST)[1] = (DST)[2] = (DST)[3] = 0
202 #define TEST_EQ_4UBV(DST, SRC) *((GLuint*)(DST)) == *((GLuint*)(SRC))
204 #define TEST_EQ_4UBV(DST, SRC) TEST_EQ_4V(DST, SRC)
208 #define COPY_4V( DST, SRC ) \
210 (DST)[0] = (SRC)[0]; \
211 (DST)[1] = (SRC)[1]; \
212 (DST)[2] = (SRC)[2]; \
213 (DST)[3] = (SRC)[3]; \
217 #define COPY_4V_CAST( DST, SRC, CAST ) \
219 (DST)[0] = (CAST)(SRC)[0]; \
220 (DST)[1] = (CAST)(SRC)[1]; \
221 (DST)[2] = (CAST)(SRC)[2]; \
222 (DST)[3] = (CAST)(SRC)[3]; \
227 #define COPY_4UBV(DST, SRC) \
229 *((GLuint*)(DST)) = *((GLuint*)(SRC)); \
232 /* The GLuint cast might fail if DST or SRC are not dword-aligned (RISC) */
233 #define COPY_4UBV(DST, SRC) \
235 (DST)[0] = (SRC)[0]; \
236 (DST)[1] = (SRC)[1]; \
237 (DST)[2] = (SRC)[2]; \
238 (DST)[3] = (SRC)[3]; \
246 #define COPY_4FV( DST, SRC ) \
248 memcpy(DST, SRC, sizeof(GLfloat) * 4); \
252 #define COPY_SZ_4V(DST, SZ, SRC) \
255 case 4: (DST)[3] = (SRC)[3]; \
256 case 3: (DST)[2] = (SRC)[2]; \
257 case 2: (DST)[1] = (SRC)[1]; \
258 case 1: (DST)[0] = (SRC)[0]; \
264 #define COPY_CLEAN_4V(DST, SZ, SRC) \
266 ASSIGN_4V( DST, 0, 0, 0, 1 ); \
267 COPY_SZ_4V( DST, SZ, SRC ); \
271 #define SUB_4V( DST, SRCA, SRCB ) \
273 (DST)[0] = (SRCA)[0] - (SRCB)[0]; \
274 (DST)[1] = (SRCA)[1] - (SRCB)[1]; \
275 (DST)[2] = (SRCA)[2] - (SRCB)[2]; \
276 (DST)[3] = (SRCA)[3] - (SRCB)[3]; \
280 #define ADD_4V( DST, SRCA, SRCB ) \
282 (DST)[0] = (SRCA)[0] + (SRCB)[0]; \
283 (DST)[1] = (SRCA)[1] + (SRCB)[1]; \
284 (DST)[2] = (SRCA)[2] + (SRCB)[2]; \
285 (DST)[3] = (SRCA)[3] + (SRCB)[3]; \
289 #define SCALE_4V( DST, SRCA, SRCB ) \
291 (DST)[0] = (SRCA)[0] * (SRCB)[0]; \
292 (DST)[1] = (SRCA)[1] * (SRCB)[1]; \
293 (DST)[2] = (SRCA)[2] * (SRCB)[2]; \
294 (DST)[3] = (SRCA)[3] * (SRCB)[3]; \
298 #define ACC_4V( DST, SRC ) \
300 (DST)[0] += (SRC)[0]; \
301 (DST)[1] += (SRC)[1]; \
302 (DST)[2] += (SRC)[2]; \
303 (DST)[3] += (SRC)[3]; \
307 #define ACC_SCALE_4V( DST, SRCA, SRCB ) \
309 (DST)[0] += (SRCA)[0] * (SRCB)[0]; \
310 (DST)[1] += (SRCA)[1] * (SRCB)[1]; \
311 (DST)[2] += (SRCA)[2] * (SRCB)[2]; \
312 (DST)[3] += (SRCA)[3] * (SRCB)[3]; \
316 #define ACC_SCALE_SCALAR_4V( DST, S, SRCB ) \
318 (DST)[0] += S * (SRCB)[0]; \
319 (DST)[1] += S * (SRCB)[1]; \
320 (DST)[2] += S * (SRCB)[2]; \
321 (DST)[3] += S * (SRCB)[3]; \
325 #define SCALE_SCALAR_4V( DST, S, SRCB ) \
327 (DST)[0] = S * (SRCB)[0]; \
328 (DST)[1] = S * (SRCB)[1]; \
329 (DST)[2] = S * (SRCB)[2]; \
330 (DST)[3] = S * (SRCB)[3]; \
334 #define SELF_SCALE_SCALAR_4V( DST, S ) \
336 (DST)[0] *= S; \
337 (DST)[1] *= S; \
338 (DST)[2] *= S; \
339 (DST)[3] *= S; \
359 #define ZERO_3V( DST ) (DST)[0] = (DST)[1] = (DST)[2] = 0
368 #define COPY_3V( DST, SRC ) \
370 (DST)[0] = (SRC)[0]; \
371 (DST)[1] = (SRC)[1]; \
372 (DST)[2] = (SRC)[2]; \
376 #define COPY_3V_CAST( DST, SRC, CAST ) \
378 (DST)[0] = (CAST)(SRC)[0]; \
379 (DST)[1] = (CAST)(SRC)[1]; \
380 (DST)[2] = (CAST)(SRC)[2]; \
384 #define COPY_3FV( DST, SRC ) \
387 (DST)[0] = _tmp[0]; \
388 (DST)[1] = _tmp[1]; \
389 (DST)[2] = _tmp[2]; \
393 #define SUB_3V( DST, SRCA, SRCB ) \
395 (DST)[0] = (SRCA)[0] - (SRCB)[0]; \
396 (DST)[1] = (SRCA)[1] - (SRCB)[1]; \
397 (DST)[2] = (SRCA)[2] - (SRCB)[2]; \
401 #define ADD_3V( DST, SRCA, SRCB ) \
403 (DST)[0] = (SRCA)[0] + (SRCB)[0]; \
404 (DST)[1] = (SRCA)[1] + (SRCB)[1]; \
405 (DST)[2] = (SRCA)[2] + (SRCB)[2]; \
409 #define SCALE_3V( DST, SRCA, SRCB ) \
411 (DST)[0] = (SRCA)[0] * (SRCB)[0]; \
412 (DST)[1] = (SRCA)[1] * (SRCB)[1]; \
413 (DST)[2] = (SRCA)[2] * (SRCB)[2]; \
417 #define SELF_SCALE_3V( DST, SRC ) \
419 (DST)[0] *= (SRC)[0]; \
420 (DST)[1] *= (SRC)[1]; \
421 (DST)[2] *= (SRC)[2]; \
425 #define ACC_3V( DST, SRC ) \
427 (DST)[0] += (SRC)[0]; \
428 (DST)[1] += (SRC)[1]; \
429 (DST)[2] += (SRC)[2]; \
433 #define ACC_SCALE_3V( DST, SRCA, SRCB ) \
435 (DST)[0] += (SRCA)[0] * (SRCB)[0]; \
436 (DST)[1] += (SRCA)[1] * (SRCB)[1]; \
437 (DST)[2] += (SRCA)[2] * (SRCB)[2]; \
441 #define SCALE_SCALAR_3V( DST, S, SRCB ) \
443 (DST)[0] = S * (SRCB)[0]; \
444 (DST)[1] = S * (SRCB)[1]; \
445 (DST)[2] = S * (SRCB)[2]; \
449 #define ACC_SCALE_SCALAR_3V( DST, S, SRCB ) \
451 (DST)[0] += S * (SRCB)[0]; \
452 (DST)[1] += S * (SRCB)[1]; \
453 (DST)[2] += S * (SRCB)[2]; \
457 #define SELF_SCALE_SCALAR_3V( DST, S ) \
459 (DST)[0] *= S; \
460 (DST)[1] *= S; \
461 (DST)[2] *= S; \
465 #define ACC_SCALAR_3V( DST, S ) \
467 (DST)[0] += S; \
468 (DST)[1] += S; \
469 (DST)[2] += S; \
488 #define ZERO_2V( DST ) (DST)[0] = (DST)[1] = 0
491 #define COPY_2V( DST, SRC ) \
493 (DST)[0] = (SRC)[0]; \
494 (DST)[1] = (SRC)[1]; \
498 #define COPY_2V_CAST( DST, SRC, CAST ) \
500 (DST)[0] = (CAST)(SRC)[0]; \
501 (DST)[1] = (CAST)(SRC)[1]; \
505 #define COPY_2FV( DST, SRC ) \
508 (DST)[0] = _tmp[0]; \
509 (DST)[1] = _tmp[1]; \
513 #define SUB_2V( DST, SRCA, SRCB ) \
515 (DST)[0] = (SRCA)[0] - (SRCB)[0]; \
516 (DST)[1] = (SRCA)[1] - (SRCB)[1]; \
520 #define ADD_2V( DST, SRCA, SRCB ) \
522 (DST)[0] = (SRCA)[0] + (SRCB)[0]; \
523 (DST)[1] = (SRCA)[1] + (SRCB)[1]; \
527 #define SCALE_2V( DST, SRCA, SRCB ) \
529 (DST)[0] = (SRCA)[0] * (SRCB)[0]; \
530 (DST)[1] = (SRCA)[1] * (SRCB)[1]; \
534 #define ACC_2V( DST, SRC ) \
536 (DST)[0] += (SRC)[0]; \
537 (DST)[1] += (SRC)[1]; \
541 #define ACC_SCALE_2V( DST, SRCA, SRCB ) \
543 (DST)[0] += (SRCA)[0] * (SRCB)[0]; \
544 (DST)[1] += (SRCA)[1] * (SRCB)[1]; \
548 #define SCALE_SCALAR_2V( DST, S, SRCB ) \
550 (DST)[0] = S * (SRCB)[0]; \
551 (DST)[1] = S * (SRCB)[1]; \
555 #define ACC_SCALE_SCALAR_2V( DST, S, SRCB ) \
557 (DST)[0] += S * (SRCB)[0]; \
558 (DST)[1] += S * (SRCB)[1]; \
562 #define SELF_SCALE_SCALAR_2V( DST, S ) \
564 (DST)[0] *= S; \
565 (DST)[1] *= S; \
569 #define ACC_SCALAR_2V( DST, S ) \
571 (DST)[0] += S; \
572 (DST)[1] += S; \
620 #define INTERP_4F( t, dst, out, in ) \
622 dst[0] = LINTERP( (t), (out)[0], (in)[0] ); \
623 dst[1] = LINTERP( (t), (out)[1], (in)[1] ); \
624 dst[2] = LINTERP( (t), (out)[2], (in)[2] ); \
625 dst[3] = LINTERP( (t), (out)[3], (in)[3] ); \
628 #define INTERP_3F( t, dst, out, in ) \
630 dst[0] = LINTERP( (t), (out)[0], (in)[0] ); \
631 dst[1] = LINTERP( (t), (out)[1], (in)[1] ); \
632 dst[2] = LINTERP( (t), (out)[2], (in)[2] ); \
635 #define INTERP_4CHAN( t, dst, out, in ) \
637 INTERP_CHAN( (t), (dst)[0], (out)[0], (in)[0] ); \
638 INTERP_CHAN( (t), (dst)[1], (out)[1], (in)[1] ); \
639 INTERP_CHAN( (t), (dst)[2], (out)[2], (in)[2] ); \
640 INTERP_CHAN( (t), (dst)[3], (out)[3], (in)[3] ); \
643 #define INTERP_3CHAN( t, dst, out, in ) \
645 INTERP_CHAN( (t), (dst)[0], (out)[0], (in)[0] ); \
646 INTERP_CHAN( (t), (dst)[1], (out)[1], (in)[1] ); \
647 INTERP_CHAN( (t), (dst)[2], (out)[2], (in)[2] ); \