if (new_state & _NEW_FOG)
st->dirty |= ST_NEW_FS_STATE;
-
- if (new_state & _NEW_FRAG_CLAMP) {
- if (st->clamp_frag_color_in_shader)
- st->dirty |= ST_NEW_FS_STATE;
- else
- st->dirty |= ST_NEW_RASTERIZER;
- }
}
if (new_state & (_NEW_LIGHT |
f->NewClipControl = ST_NEW_VIEWPORT | ST_NEW_RASTERIZER;
f->NewClipPlane = ST_NEW_CLIP_STATE;
+ if (st->clamp_frag_color_in_shader) {
+ f->NewFragClamp = ST_NEW_FS_STATE;
+ } else {
+ f->NewFragClamp = ST_NEW_RASTERIZER;
+ }
+
if (st->clamp_frag_depth_in_shader) {
f->NewClipControl |= ST_NEW_VS_STATE | ST_NEW_GS_STATE |
ST_NEW_TES_STATE;
* profile, so that u_vbuf is bypassed completely if there is nothing else
* to do.
*/
- unsigned cso_flags =
- ctx->API == API_OPENGL_CORE ? CSO_NO_USER_VERTEX_BUFFERS : 0;
+ unsigned cso_flags;
+ switch (ctx->API) {
+ case API_OPENGL_CORE:
+ cso_flags = CSO_NO_USER_VERTEX_BUFFERS;
+ break;
+ case API_OPENGLES:
+ case API_OPENGLES2:
+ cso_flags = CSO_NO_64B_VERTEX_BUFFERS;
+ break;
+ default:
+ cso_flags = 0;
+ break;
+ }
+
st->cso_context = cso_create_context(pipe, cso_flags);
st_init_atoms(st);