86f1c62e752245bae401100066a9c24a089e50e4
[mesa.git] / src / mesa / state_tracker / st_atom_texture.c
1 /**************************************************************************
2 *
3 * Copyright 2007 VMware, Inc.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 **************************************************************************/
27
28 /*
29 * Authors:
30 * Keith Whitwell <keithw@vmware.com>
31 * Brian Paul
32 */
33
34
35 #include "main/context.h"
36 #include "main/macros.h"
37 #include "main/mtypes.h"
38 #include "main/samplerobj.h"
39 #include "main/teximage.h"
40 #include "main/texobj.h"
41 #include "program/prog_instruction.h"
42
43 #include "st_context.h"
44 #include "st_atom.h"
45 #include "st_texture.h"
46 #include "st_format.h"
47 #include "st_cb_texture.h"
48 #include "pipe/p_context.h"
49 #include "util/u_format.h"
50 #include "util/u_inlines.h"
51 #include "cso_cache/cso_context.h"
52
53
54 /**
55 * Return swizzle1(swizzle2)
56 */
57 static unsigned
58 swizzle_swizzle(unsigned swizzle1, unsigned swizzle2)
59 {
60 unsigned i, swz[4];
61
62 if (swizzle1 == SWIZZLE_XYZW) {
63 /* identity swizzle, no change to swizzle2 */
64 return swizzle2;
65 }
66
67 for (i = 0; i < 4; i++) {
68 unsigned s = GET_SWZ(swizzle1, i);
69 switch (s) {
70 case SWIZZLE_X:
71 case SWIZZLE_Y:
72 case SWIZZLE_Z:
73 case SWIZZLE_W:
74 swz[i] = GET_SWZ(swizzle2, s);
75 break;
76 case SWIZZLE_ZERO:
77 swz[i] = SWIZZLE_ZERO;
78 break;
79 case SWIZZLE_ONE:
80 swz[i] = SWIZZLE_ONE;
81 break;
82 default:
83 assert(!"Bad swizzle term");
84 swz[i] = SWIZZLE_X;
85 }
86 }
87
88 return MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]);
89 }
90
91
92 /**
93 * Given a user-specified texture base format, the actual gallium texture
94 * format and the current GL_DEPTH_MODE, return a texture swizzle.
95 *
96 * Consider the case where the user requests a GL_RGB internal texture
97 * format the driver actually uses an RGBA format. The A component should
98 * be ignored and sampling from the texture should always return (r,g,b,1).
99 * But if we rendered to the texture we might have written A values != 1.
100 * By sampling the texture with a ".xyz1" swizzle we'll get the expected A=1.
101 * This function computes the texture swizzle needed to get the expected
102 * values.
103 *
104 * In the case of depth textures, the GL_DEPTH_MODE state determines the
105 * texture swizzle.
106 *
107 * This result must be composed with the user-specified swizzle to get
108 * the final swizzle.
109 */
110 static unsigned
111 compute_texture_format_swizzle(GLenum baseFormat, GLenum depthMode,
112 enum pipe_format actualFormat,
113 unsigned glsl_version)
114 {
115 switch (baseFormat) {
116 case GL_RGBA:
117 return SWIZZLE_XYZW;
118 case GL_RGB:
119 if (util_format_has_alpha(actualFormat))
120 return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_ONE);
121 else
122 return SWIZZLE_XYZW;
123 case GL_RG:
124 if (util_format_get_nr_components(actualFormat) > 2)
125 return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_ZERO, SWIZZLE_ONE);
126 else
127 return SWIZZLE_XYZW;
128 case GL_RED:
129 if (util_format_get_nr_components(actualFormat) > 1)
130 return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_ZERO,
131 SWIZZLE_ZERO, SWIZZLE_ONE);
132 else
133 return SWIZZLE_XYZW;
134 case GL_ALPHA:
135 if (util_format_get_nr_components(actualFormat) > 1)
136 return MAKE_SWIZZLE4(SWIZZLE_ZERO, SWIZZLE_ZERO,
137 SWIZZLE_ZERO, SWIZZLE_W);
138 else
139 return SWIZZLE_XYZW;
140 case GL_LUMINANCE:
141 if (util_format_get_nr_components(actualFormat) > 1)
142 return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_ONE);
143 else
144 return SWIZZLE_XYZW;
145 case GL_LUMINANCE_ALPHA:
146 if (util_format_get_nr_components(actualFormat) > 2)
147 return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_W);
148 else
149 return SWIZZLE_XYZW;
150 case GL_INTENSITY:
151 if (util_format_get_nr_components(actualFormat) > 1)
152 return SWIZZLE_XXXX;
153 else
154 return SWIZZLE_XYZW;
155 case GL_STENCIL_INDEX:
156 case GL_DEPTH_STENCIL:
157 case GL_DEPTH_COMPONENT:
158 /* Now examine the depth mode */
159 switch (depthMode) {
160 case GL_LUMINANCE:
161 return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_ONE);
162 case GL_INTENSITY:
163 return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X);
164 case GL_ALPHA:
165 /* The texture(sampler*Shadow) functions from GLSL 1.30 ignore
166 * the depth mode and return float, while older shadow* functions
167 * and ARB_fp instructions return vec4 according to the depth mode.
168 *
169 * The problem with the GLSL 1.30 functions is that GL_ALPHA forces
170 * them to return 0, breaking them completely.
171 *
172 * A proper fix would increase code complexity and that's not worth
173 * it for a rarely used feature such as the GL_ALPHA depth mode
174 * in GL3. Therefore, change GL_ALPHA to GL_INTENSITY for all
175 * shaders that use GLSL 1.30 or later.
176 *
177 * BTW, it's required that sampler views are updated when
178 * shaders change (check_sampler_swizzle takes care of that).
179 */
180 if (glsl_version && glsl_version >= 130)
181 return SWIZZLE_XXXX;
182 else
183 return MAKE_SWIZZLE4(SWIZZLE_ZERO, SWIZZLE_ZERO,
184 SWIZZLE_ZERO, SWIZZLE_X);
185 case GL_RED:
186 return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_ZERO,
187 SWIZZLE_ZERO, SWIZZLE_ONE);
188 default:
189 assert(!"Unexpected depthMode");
190 return SWIZZLE_XYZW;
191 }
192 default:
193 assert(!"Unexpected baseFormat");
194 return SWIZZLE_XYZW;
195 }
196 }
197
198
199 static unsigned
200 get_texture_format_swizzle(const struct st_context *st,
201 const struct st_texture_object *stObj,
202 unsigned glsl_version)
203 {
204 GLenum baseFormat = _mesa_texture_base_format(&stObj->base);
205 unsigned tex_swizzle;
206
207 if (baseFormat != GL_NONE) {
208 GLenum depth_mode = stObj->base.DepthMode;
209 /* In ES 3.0, DEPTH_TEXTURE_MODE is expected to be GL_RED for textures
210 * with depth component data specified with a sized internal format.
211 */
212 if (_mesa_is_gles3(st->ctx) &&
213 util_format_is_depth_or_stencil(stObj->pt->format)) {
214 const struct gl_texture_image *firstImage =
215 _mesa_base_tex_image(&stObj->base);
216 if (firstImage->InternalFormat != GL_DEPTH_COMPONENT &&
217 firstImage->InternalFormat != GL_DEPTH_STENCIL &&
218 firstImage->InternalFormat != GL_STENCIL_INDEX)
219 depth_mode = GL_RED;
220 }
221 tex_swizzle = compute_texture_format_swizzle(baseFormat,
222 depth_mode,
223 stObj->pt->format,
224 glsl_version);
225 }
226 else {
227 tex_swizzle = SWIZZLE_XYZW;
228 }
229
230 /* Combine the texture format swizzle with user's swizzle */
231 return swizzle_swizzle(stObj->base._Swizzle, tex_swizzle);
232 }
233
234
235 /**
236 * Return TRUE if the texture's sampler view swizzle is not equal to
237 * the texture's swizzle.
238 *
239 * \param stObj the st texture object,
240 */
241 static boolean
242 check_sampler_swizzle(const struct st_context *st,
243 const struct st_texture_object *stObj,
244 const struct pipe_sampler_view *sv, unsigned glsl_version)
245 {
246 unsigned swizzle = get_texture_format_swizzle(st, stObj, glsl_version);
247
248 return ((sv->swizzle_r != GET_SWZ(swizzle, 0)) ||
249 (sv->swizzle_g != GET_SWZ(swizzle, 1)) ||
250 (sv->swizzle_b != GET_SWZ(swizzle, 2)) ||
251 (sv->swizzle_a != GET_SWZ(swizzle, 3)));
252 }
253
254
255 static unsigned
256 last_level(const struct st_texture_object *stObj)
257 {
258 unsigned ret = MIN2(stObj->base.MinLevel + stObj->base._MaxLevel,
259 stObj->pt->last_level);
260 if (stObj->base.Immutable)
261 ret = MIN2(ret, stObj->base.MinLevel + stObj->base.NumLevels - 1);
262 return ret;
263 }
264
265 static unsigned
266 last_layer(const struct st_texture_object *stObj)
267 {
268 if (stObj->base.Immutable && stObj->pt->array_size > 1)
269 return MIN2(stObj->base.MinLayer + stObj->base.NumLayers - 1,
270 stObj->pt->array_size - 1);
271 return stObj->pt->array_size - 1;
272 }
273
274 static struct pipe_sampler_view *
275 st_create_texture_sampler_view_from_stobj(struct st_context *st,
276 struct st_texture_object *stObj,
277 enum pipe_format format,
278 unsigned glsl_version)
279 {
280 struct pipe_sampler_view templ;
281 unsigned swizzle = get_texture_format_swizzle(st, stObj, glsl_version);
282
283 u_sampler_view_default_template(&templ,
284 stObj->pt,
285 format);
286
287 if (stObj->pt->target == PIPE_BUFFER) {
288 unsigned base, size;
289
290 base = stObj->base.BufferOffset;
291 if (base >= stObj->pt->width0)
292 return NULL;
293 size = MIN2(stObj->pt->width0 - base, (unsigned)stObj->base.BufferSize);
294 if (!size)
295 return NULL;
296
297 templ.u.buf.offset = base;
298 templ.u.buf.size = size;
299 } else {
300 templ.u.tex.first_level = stObj->base.MinLevel + stObj->base.BaseLevel;
301 templ.u.tex.last_level = last_level(stObj);
302 assert(templ.u.tex.first_level <= templ.u.tex.last_level);
303 templ.u.tex.first_layer = stObj->base.MinLayer;
304 templ.u.tex.last_layer = last_layer(stObj);
305 assert(templ.u.tex.first_layer <= templ.u.tex.last_layer);
306 templ.target = gl_target_to_pipe(stObj->base.Target);
307 }
308
309 templ.swizzle_r = GET_SWZ(swizzle, 0);
310 templ.swizzle_g = GET_SWZ(swizzle, 1);
311 templ.swizzle_b = GET_SWZ(swizzle, 2);
312 templ.swizzle_a = GET_SWZ(swizzle, 3);
313
314 return st->pipe->create_sampler_view(st->pipe, stObj->pt, &templ);
315 }
316
317
318 static struct pipe_sampler_view *
319 st_get_texture_sampler_view_from_stobj(struct st_context *st,
320 struct st_texture_object *stObj,
321 enum pipe_format format,
322 unsigned glsl_version)
323 {
324 struct pipe_sampler_view **sv;
325 const struct st_texture_image *firstImage;
326 if (!stObj || !stObj->pt) {
327 return NULL;
328 }
329
330 sv = st_texture_get_sampler_view(st, stObj);
331
332 if (util_format_is_depth_and_stencil(format)) {
333 if (stObj->base.StencilSampling)
334 format = util_format_stencil_only(format);
335 else {
336 firstImage = st_texture_image_const(_mesa_base_tex_image(&stObj->base));
337 if (firstImage->base._BaseFormat == GL_STENCIL_INDEX)
338 format = util_format_stencil_only(format);
339 }
340 }
341
342 /* if sampler view has changed dereference it */
343 if (*sv) {
344 if (check_sampler_swizzle(st, stObj, *sv, glsl_version) ||
345 (format != (*sv)->format) ||
346 gl_target_to_pipe(stObj->base.Target) != (*sv)->target ||
347 stObj->base.MinLevel + stObj->base.BaseLevel != (*sv)->u.tex.first_level ||
348 last_level(stObj) != (*sv)->u.tex.last_level ||
349 stObj->base.MinLayer != (*sv)->u.tex.first_layer ||
350 last_layer(stObj) != (*sv)->u.tex.last_layer) {
351 pipe_sampler_view_reference(sv, NULL);
352 }
353 }
354
355 if (!*sv) {
356 *sv = st_create_texture_sampler_view_from_stobj(st, stObj,
357 format, glsl_version);
358
359 } else if ((*sv)->context != st->pipe) {
360 /* Recreate view in correct context, use existing view as template */
361 struct pipe_sampler_view *new_sv =
362 st->pipe->create_sampler_view(st->pipe, stObj->pt, *sv);
363 pipe_sampler_view_reference(sv, NULL);
364 *sv = new_sv;
365 }
366
367 return *sv;
368 }
369
370 static GLboolean
371 update_single_texture(struct st_context *st,
372 struct pipe_sampler_view **sampler_view,
373 GLuint texUnit, unsigned glsl_version)
374 {
375 struct gl_context *ctx = st->ctx;
376 const struct gl_sampler_object *samp;
377 struct gl_texture_object *texObj;
378 struct st_texture_object *stObj;
379 enum pipe_format view_format;
380 GLboolean retval;
381
382 samp = _mesa_get_samplerobj(ctx, texUnit);
383
384 texObj = ctx->Texture.Unit[texUnit]._Current;
385
386 if (!texObj) {
387 texObj = _mesa_get_fallback_texture(ctx, TEXTURE_2D_INDEX);
388 samp = &texObj->Sampler;
389 }
390 stObj = st_texture_object(texObj);
391
392 retval = st_finalize_texture(ctx, st->pipe, texObj);
393 if (!retval) {
394 /* out of mem */
395 return GL_FALSE;
396 }
397
398 /* Determine the format of the texture sampler view */
399 if (texObj->Target == GL_TEXTURE_BUFFER) {
400 view_format =
401 st_mesa_format_to_pipe_format(st, stObj->base._BufferObjectFormat);
402 }
403 else {
404 view_format =
405 stObj->surface_based ? stObj->surface_format : stObj->pt->format;
406
407 /* If sRGB decoding is off, use the linear format */
408 if (samp->sRGBDecode == GL_SKIP_DECODE_EXT) {
409 view_format = util_format_linear(view_format);
410 }
411 }
412
413 switch (view_format) {
414 case PIPE_FORMAT_NV12:
415 case PIPE_FORMAT_IYUV:
416 view_format = PIPE_FORMAT_R8_UNORM;
417 break;
418 default:
419 break;
420 }
421
422 *sampler_view =
423 st_get_texture_sampler_view_from_stobj(st, stObj, view_format,
424 glsl_version);
425 return GL_TRUE;
426 }
427
428
429
430 static void
431 update_textures(struct st_context *st,
432 gl_shader_stage mesa_shader,
433 const struct gl_program *prog,
434 unsigned max_units,
435 struct pipe_sampler_view **sampler_views,
436 unsigned *num_textures)
437 {
438 const GLuint old_max = *num_textures;
439 GLbitfield samplers_used = prog->SamplersUsed;
440 GLbitfield free_slots = ~prog->SamplersUsed;
441 GLbitfield external_samplers_used = prog->ExternalSamplersUsed;
442 GLuint unit;
443 struct gl_shader_program *shader =
444 st->ctx->_Shader->CurrentProgram[mesa_shader];
445 unsigned glsl_version = shader ? shader->Version : 0;
446 enum pipe_shader_type shader_stage = st_shader_stage_to_ptarget(mesa_shader);
447
448 if (samplers_used == 0x0 && old_max == 0)
449 return;
450
451 *num_textures = 0;
452
453 /* loop over sampler units (aka tex image units) */
454 for (unit = 0; unit < max_units; unit++, samplers_used >>= 1) {
455 struct pipe_sampler_view *sampler_view = NULL;
456
457 if (samplers_used & 1) {
458 const GLuint texUnit = prog->SamplerUnits[unit];
459 GLboolean retval;
460
461 retval = update_single_texture(st, &sampler_view, texUnit,
462 glsl_version);
463 if (retval == GL_FALSE)
464 continue;
465
466 *num_textures = unit + 1;
467 }
468 else if (samplers_used == 0 && unit >= old_max) {
469 /* if we've reset all the old views and we have no more new ones */
470 break;
471 }
472
473 pipe_sampler_view_reference(&(sampler_views[unit]), sampler_view);
474 }
475
476 /* For any external samplers with multiplaner YUV, stuff the additional
477 * sampler views we need at the end.
478 *
479 * Trying to cache the sampler view in the stObj looks painful, so just
480 * re-create the sampler view for the extra planes each time. Main use
481 * case is video playback (ie. fps games wouldn't be using this) so I
482 * guess no point to try to optimize this feature.
483 */
484 while (unlikely(external_samplers_used)) {
485 GLuint unit = u_bit_scan(&external_samplers_used);
486 GLuint extra = 0;
487 struct st_texture_object *stObj =
488 st_get_texture_object(st->ctx, prog, unit);
489 struct pipe_sampler_view tmpl;
490
491 if (!stObj)
492 continue;
493
494 /* use original view as template: */
495 tmpl = *sampler_views[unit];
496
497 switch (st_get_view_format(stObj)) {
498 case PIPE_FORMAT_NV12:
499 /* we need one additional R8G8 view: */
500 tmpl.format = PIPE_FORMAT_RG88_UNORM;
501 tmpl.swizzle_g = PIPE_SWIZZLE_Y; /* tmpl from Y plane is R8 */
502 extra = u_bit_scan(&free_slots);
503 sampler_views[extra] =
504 st->pipe->create_sampler_view(st->pipe, stObj->pt->next, &tmpl);
505 break;
506 case PIPE_FORMAT_IYUV:
507 /* we need two additional R8 views: */
508 tmpl.format = PIPE_FORMAT_R8_UNORM;
509 extra = u_bit_scan(&free_slots);
510 sampler_views[extra] =
511 st->pipe->create_sampler_view(st->pipe, stObj->pt->next, &tmpl);
512 extra = u_bit_scan(&free_slots);
513 sampler_views[extra] =
514 st->pipe->create_sampler_view(st->pipe, stObj->pt->next->next, &tmpl);
515 break;
516 default:
517 break;
518 }
519
520 *num_textures = MAX2(*num_textures, extra + 1);
521 }
522
523 cso_set_sampler_views(st->cso_context,
524 shader_stage,
525 *num_textures,
526 sampler_views);
527 }
528
529
530
531 static void
532 update_vertex_textures(struct st_context *st)
533 {
534 const struct gl_context *ctx = st->ctx;
535
536 if (ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits > 0) {
537 update_textures(st,
538 MESA_SHADER_VERTEX,
539 &ctx->VertexProgram._Current->Base,
540 ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits,
541 st->state.sampler_views[PIPE_SHADER_VERTEX],
542 &st->state.num_sampler_views[PIPE_SHADER_VERTEX]);
543 }
544 }
545
546
547 static void
548 update_fragment_textures(struct st_context *st)
549 {
550 const struct gl_context *ctx = st->ctx;
551
552 update_textures(st,
553 MESA_SHADER_FRAGMENT,
554 &ctx->FragmentProgram._Current->Base,
555 ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits,
556 st->state.sampler_views[PIPE_SHADER_FRAGMENT],
557 &st->state.num_sampler_views[PIPE_SHADER_FRAGMENT]);
558 }
559
560
561 static void
562 update_geometry_textures(struct st_context *st)
563 {
564 const struct gl_context *ctx = st->ctx;
565
566 if (ctx->GeometryProgram._Current) {
567 update_textures(st,
568 MESA_SHADER_GEOMETRY,
569 &ctx->GeometryProgram._Current->Base,
570 ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits,
571 st->state.sampler_views[PIPE_SHADER_GEOMETRY],
572 &st->state.num_sampler_views[PIPE_SHADER_GEOMETRY]);
573 }
574 }
575
576
577 static void
578 update_tessctrl_textures(struct st_context *st)
579 {
580 const struct gl_context *ctx = st->ctx;
581
582 if (ctx->TessCtrlProgram._Current) {
583 update_textures(st,
584 MESA_SHADER_TESS_CTRL,
585 &ctx->TessCtrlProgram._Current->Base,
586 ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxTextureImageUnits,
587 st->state.sampler_views[PIPE_SHADER_TESS_CTRL],
588 &st->state.num_sampler_views[PIPE_SHADER_TESS_CTRL]);
589 }
590 }
591
592
593 static void
594 update_tesseval_textures(struct st_context *st)
595 {
596 const struct gl_context *ctx = st->ctx;
597
598 if (ctx->TessEvalProgram._Current) {
599 update_textures(st,
600 MESA_SHADER_TESS_EVAL,
601 &ctx->TessEvalProgram._Current->Base,
602 ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxTextureImageUnits,
603 st->state.sampler_views[PIPE_SHADER_TESS_EVAL],
604 &st->state.num_sampler_views[PIPE_SHADER_TESS_EVAL]);
605 }
606 }
607
608
609 static void
610 update_compute_textures(struct st_context *st)
611 {
612 const struct gl_context *ctx = st->ctx;
613
614 if (ctx->ComputeProgram._Current) {
615 update_textures(st,
616 MESA_SHADER_COMPUTE,
617 &ctx->ComputeProgram._Current->Base,
618 ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits,
619 st->state.sampler_views[PIPE_SHADER_COMPUTE],
620 &st->state.num_sampler_views[PIPE_SHADER_COMPUTE]);
621 }
622 }
623
624
625 const struct st_tracked_state st_update_fragment_texture = {
626 update_fragment_textures /* update */
627 };
628
629
630 const struct st_tracked_state st_update_vertex_texture = {
631 update_vertex_textures /* update */
632 };
633
634
635 const struct st_tracked_state st_update_geometry_texture = {
636 update_geometry_textures /* update */
637 };
638
639
640 const struct st_tracked_state st_update_tessctrl_texture = {
641 update_tessctrl_textures /* update */
642 };
643
644
645 const struct st_tracked_state st_update_tesseval_texture = {
646 update_tesseval_textures /* update */
647 };
648
649
650 const struct st_tracked_state st_update_compute_texture = {
651 update_compute_textures /* update */
652 };