Lines Matching defs:dst
317 /* NOTE: dst may alias src */
320 struct ureg_dst dst, struct ureg_src src)
327 ureg_MUL(ureg, dst, src, _X(tmp));
1142 struct ureg_dst dst = ureg_DECL_temporary(ps->ureg);
1143 ureg_ADD(ps->ureg, dst, ureg_imm1f(ps->ureg, 1.0f), ureg_negate(reg));
1144 reg = ureg_src(dst);
1186 is_MOV_no_op(struct ureg_dst dst, struct ureg_src src)
1188 return !dst.WriteMask ||
1189 (dst.File == src.File &&
1190 dst.Index == src.Index &&
1191 !dst.Indirect &&
1192 !dst.Saturate &&
1196 (!(dst.WriteMask & TGSI_WRITEMASK_X) || (src.SwizzleX == TGSI_SWIZZLE_X)) &&
1197 (!(dst.WriteMask & TGSI_WRITEMASK_Y) || (src.SwizzleY == TGSI_SWIZZLE_Y)) &&
1198 (!(dst.WriteMask & TGSI_WRITEMASK_Z) || (src.SwizzleZ == TGSI_SWIZZLE_Z)) &&
1199 (!(dst.WriteMask & TGSI_WRITEMASK_W) || (src.SwizzleW == TGSI_SWIZZLE_W)));
1204 ps_do_ts_op(struct ps_build_ctx *ps, unsigned top, struct ureg_dst dst, struct ureg_src *arg)
1211 tmp.WriteMask = dst.WriteMask;
1219 dst = ureg_saturate(dst);
1223 if (!is_MOV_no_op(dst, arg[1]))
1224 ureg_MOV(ureg, dst, arg[1]);
1227 if (!is_MOV_no_op(dst, arg[2]))
1228 ureg_MOV(ureg, dst, arg[2]);
1231 ureg_MUL(ureg, dst, arg[1], arg[2]);
1235 ureg_ADD(ureg, dst, ureg_src(tmp), ureg_src(tmp));
1239 ureg_MUL(ureg, dst, ureg_src(tmp), ureg_imm1f(ureg, 4.0f));
1242 ureg_ADD(ureg, dst, arg[1], arg[2]);
1246 ureg_ADD(ureg, dst, ureg_src(tmp), ureg_imm1f(ureg, -0.5f));
1250 ureg_MAD(ureg, dst, ureg_src(tmp), ureg_imm1f(ureg, 2.0f), ureg_imm1f(ureg, -1.0f));
1253 ureg_ADD(ureg, dst, arg[1], ureg_negate(arg[2]));
1257 ureg_MAD(ureg, dst, ureg_src(tmp), arg[2], arg[1]);
1260 ureg_LRP(ureg, dst, _WWWW(ps->vC[0]), arg[1], arg[2]);
1264 ureg_LRP(ureg, dst, _W(ps->rTex), arg[1], arg[2]);
1267 ureg_LRP(ureg, dst, _WWWW(_CONST(20)), arg[1], arg[2]);
1271 ureg_MAD(ureg, dst, arg[2], _X(tmp), arg[1]);
1274 ureg_LRP(ureg, dst, _WWWW(ps->rCurSrc), arg[1], arg[2]);
1277 ureg_MOV(ureg, dst, arg[1]);
1281 ureg_MAD(ureg, dst, _WWWW(arg[1]), arg[2], arg[1]);
1284 ureg_MAD(ureg, dst, arg[1], arg[2], _WWWW(arg[1]));
1288 ureg_MAD(ureg, dst, _X(tmp), arg[2], arg[1]);
1292 ureg_MAD(ureg, dst, ureg_src(tmp), arg[2], _WWWW(arg[1]));
1302 ureg_MUL(ureg, ureg_saturate(dst), ureg_src(tmp), ureg_imm4f(ureg,4.0,4.0,4.0,4.0));
1305 ureg_MAD(ureg, dst, arg[1], arg[2], arg[0]);
1308 ureg_LRP(ureg, dst, arg[0], arg[1], arg[2]);
1398 struct ureg_dst dst;
1468 dst = ps_get_ts_dst(&ps, key->ts[s].resultarg ? D3DTA_TEMP : D3DTA_CURRENT);
1486 dst.WriteMask = TGSI_WRITEMASK_XYZ;
1490 dst.WriteMask = TGSI_WRITEMASK_XYZW;
1495 ps_do_ts_op(&ps, key->ts[s].colorop, dst, arg);
1497 if (dst.WriteMask != TGSI_WRITEMASK_XYZW) {
1498 dst.WriteMask = TGSI_WRITEMASK_W;
1503 ps_do_ts_op(&ps, key->ts[s].alphaop, dst, arg);
1908 struct fvec4 *dst = (struct fvec4 *)device->ff.vs_const;
1914 memcpy(&dst[20], &mtl->Diffuse, 4 * sizeof(float));
1915 memcpy(&dst[21], &mtl->Ambient, 4 * sizeof(float));
1916 memcpy(&dst[22], &mtl->Specular, 4 * sizeof(float));
1917 dst[23].x = mtl->Power;
1918 memcpy(&dst[24], &mtl->Emissive, 4 * sizeof(float));
1919 d3dcolor_to_rgba(&dst[25].x, context->rs[D3DRS_AMBIENT]);
1920 dst[19].x = dst[25].x * mtl->Ambient.r + mtl->Emissive.r;
1921 dst[19].y = dst[25].y * mtl->Ambient.g + mtl->Emissive.g;
1922 dst[19].z = dst[25].z * mtl->Ambient.b + mtl->Emissive.b;
1931 dst[32 + l * 8].x = light->Type;
1932 dst[32 + l * 8].y = light->Attenuation0;
1933 dst[32 + l * 8].z = light->Attenuation1;
1934 dst[32 + l * 8].w = light->Attenuation2;
1935 memcpy(&dst[33 + l * 8].x, &light->Diffuse, sizeof(light->Diffuse));
1936 memcpy(&dst[34 + l * 8].x, &light->Specular, sizeof(light->Specular));
1937 memcpy(&dst[35 + l * 8].x, &light->Ambient, sizeof(light->Ambient));
1938 nine_d3d_vector4_matrix_mul((D3DVECTOR *)&dst[36 + l * 8].x, &light->Position, GET_D3DTS(VIEW));
1939 nine_d3d_vector3_matrix_mul((D3DVECTOR *)&dst[37 + l * 8].x, &light->Direction, GET_D3DTS(VIEW));
1940 dst[36 + l * 8].w = light->Type == D3DLIGHT_DIRECTIONAL ? 1e9f : light->Range;
1941 dst[37 + l * 8].w = light->Falloff;
1942 dst[38 + l * 8].x = cosf(light->Theta * 0.5f);
1943 dst[38 + l * 8].y = cosf(light->Phi * 0.5f);
1944 dst[38 + l * 8].z = 1.0f / (dst[38 + l * 8].x - dst[38 + l * 8].y);
1945 dst[39 + l * 8].w = (float)((l + 1) == context->ff.num_lights_active);
1953 struct fvec4 *dst = (struct fvec4 *)device->ff.vs_const;
1957 dst[26].x = asfloat(context->rs[D3DRS_POINTSIZE_MIN]);
1958 dst[26].y = asfloat(context->rs[D3DRS_POINTSIZE_MAX]);
1959 dst[26].z = asfloat(context->rs[D3DRS_POINTSIZE]);
1960 dst[26].w = asfloat(context->rs[D3DRS_POINTSCALE_A]);
1961 dst[27].x = asfloat(context->rs[D3DRS_POINTSCALE_B]);
1962 dst[27].y = asfloat(context->rs[D3DRS_POINTSCALE_C]);
1963 dst[28].x = asfloat(context->rs[D3DRS_FOGEND]);
1964 dst[28].y = 1.0f / (asfloat(context->rs[D3DRS_FOGEND]) - asfloat(context->rs[D3DRS_FOGSTART]));
1965 if (isinf(dst[28].y))
1966 dst[28].y = 0.0f;
1967 dst[28].z = asfloat(context->rs[D3DRS_FOGDENSITY]);
1989 struct fvec4 *dst = (struct fvec4 *)device->ff.ps_const;
1996 d3dcolor_to_rgba(&dst[s].x, context->ff.tex_stage[s][D3DTSS_CONSTANT]);
1999 dst[8 + s].x = asfloat(context->ff.tex_stage[s][D3DTSS_BUMPENVMAT00]);
2000 dst[8 + s].y = asfloat(context->ff.tex_stage[s][D3DTSS_BUMPENVMAT01]);
2001 dst[8 + s].z = asfloat(context->ff.tex_stage[s][D3DTSS_BUMPENVMAT10]);
2002 dst[8 + s].w = asfloat(context->ff.tex_stage[s][D3DTSS_BUMPENVMAT11]);
2004 dst[16 + s / 2].z = asfloat(context->ff.tex_stage[s][D3DTSS_BUMPENVLSCALE]);
2005 dst[16 + s / 2].w = asfloat(context->ff.tex_stage[s][D3DTSS_BUMPENVLOFFSET]);
2007 dst[16 + s / 2].x = asfloat(context->ff.tex_stage[s][D3DTSS_BUMPENVLSCALE]);
2008 dst[16 + s / 2].y = asfloat(context->ff.tex_stage[s][D3DTSS_BUMPENVLOFFSET]);
2012 d3dcolor_to_rgba(&dst[20].x, context->rs[D3DRS_TEXTUREFACTOR]);
2013 d3dcolor_to_rgba(&dst[21].x, context->rs[D3DRS_FOGCOLOR]);
2014 dst[22].x = asfloat(context->rs[D3DRS_FOGEND]);
2015 dst[22].y = 1.0f / (asfloat(context->rs[D3DRS_FOGEND]) - asfloat(context->rs[D3DRS_FOGSTART]));
2016 dst[22].z = asfloat(context->rs[D3DRS_FOGDENSITY]);
2023 struct fvec4 *dst = (struct fvec4 *)device->ff.vs_const;
2029 dst[100].x = 2.0f / (float)(viewport->Width);
2030 dst[100].y = 2.0f / (float)(viewport->Height);
2031 dst[100].z = (diffZ == 0.0f) ? 0.0f : (1.0f / diffZ);
2032 dst[100].w = (float)(viewport->Width);
2033 dst[101].x = (float)(viewport->X);
2034 dst[101].y = (float)(viewport->Y);
2035 dst[101].z = (float)(viewport->MinZ);