- so->texconst0 =
- A6XX_TEX_CONST_0_FMT(fd6_pipe2tex(format)) |
- fd6_tex_swiz(format, cso->swizzle_r, cso->swizzle_g,
- cso->swizzle_b, cso->swizzle_a);
-
- /* NOTE: since we sample z24s8 using 8888_UINT format, the swizzle
- * we get isn't quite right. Use SWAP(XYZW) as a cheap and cheerful
- * way to re-arrange things so stencil component is where the swiz
- * expects.
- *
- * Note that gallium expects stencil sampler to return (s,s,s,s)
- * which isn't quite true. To make that happen we'd have to massage
- * the swizzle. But in practice only the .x component is used.
- */
- if (format == PIPE_FORMAT_X24S8_UINT) {
- so->texconst0 |= A6XX_TEX_CONST_0_SWAP(XYZW);
- }
-
- if (util_format_is_srgb(format)) {
- if (use_astc_srgb_workaround(pctx, format))
- so->astc_srgb = true;
- so->texconst0 |= A6XX_TEX_CONST_0_SRGB;
- }
-