result = svga_translate_fragment_program( fs, key );
if (result == NULL) {
- ret = PIPE_ERROR_OUT_OF_MEMORY;
+ ret = PIPE_ERROR; /* some problem during translation */
goto fail;
}
/* SVGA_NEW_RAST
*/
key->light_twoside = svga->curr.rast->templ.light_twoside;
- key->front_cw = (svga->curr.rast->templ.front_winding ==
- PIPE_WINDING_CW);
+ key->front_ccw = svga->curr.rast->templ.front_ccw;
}
/* The blend workaround for simulating logicop xor behaviour
* requires that the incoming fragment color be white. This change
- * achieves that by creating a varient of the current fragment
+ * achieves that by creating a variant of the current fragment
* shader that overrides all output colors with 1,1,1,1
*
* This will work for most shaders, including those containing
key->tex[i].unnormalized = TRUE;
++key->num_unnormalized_coords;
}
+
+ key->tex[i].swizzle_r = svga->curr.sampler_views[i]->swizzle_r;
+ key->tex[i].swizzle_g = svga->curr.sampler_views[i]->swizzle_g;
+ key->tex[i].swizzle_b = svga->curr.sampler_views[i]->swizzle_b;
+ key->tex[i].swizzle_a = svga->curr.sampler_views[i]->swizzle_a;
}
}
key->num_textures = svga->curr.num_sampler_views;
}
}
+ /* sprite coord gen state */
+ for (i = 0; i < svga->curr.num_samplers; ++i) {
+ key->tex[i].sprite_texgen =
+ svga->curr.rast->templ.sprite_coord_enable & (1 << i);
+ }
+
+ key->sprite_origin_lower_left = (svga->curr.rast->templ.sprite_coord_mode
+ == PIPE_SPRITE_COORD_LOWER_LEFT);
+
return 0;
}