spe_comment(f, 0, "Unpack framebuffer colors, convert to floats");
switch (color_format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
/* fbB = fbRGBA & mask */
spe_and(f, fbB_reg, fbRGBA_reg, mask0_reg);
spe_roti(f, fbA_reg, fbA_reg, -24);
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
/* fbA = fbRGBA & mask */
spe_and(f, fbA_reg, fbRGBA_reg, mask0_reg);
spe_rotmi(f, a_reg, a_reg, -24);
/* Shift the color bytes according to the surface format */
- if (color_format == PIPE_FORMAT_A8R8G8B8_UNORM) {
+ if (color_format == PIPE_FORMAT_B8G8R8A8_UNORM) {
spe_roti(f, g_reg, g_reg, 8); /* green <<= 8 */
spe_roti(f, r_reg, r_reg, 16); /* red <<= 16 */
spe_roti(f, a_reg, a_reg, 24); /* alpha <<= 24 */
}
- else if (color_format == PIPE_FORMAT_B8G8R8A8_UNORM) {
+ else if (color_format == PIPE_FORMAT_A8R8G8B8_UNORM) {
spe_roti(f, r_reg, r_reg, 8); /* red <<= 8 */
spe_roti(f, g_reg, g_reg, 16); /* green <<= 16 */
spe_roti(f, b_reg, b_reg, 24); /* blue <<= 24 */
* end up, so we can mask them correctly.
*/
switch(color_format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
/* ARGB */
a_mask = 0xff000000;
r_mask = 0x00ff0000;
g_mask = 0x0000ff00;
b_mask = 0x000000ff;
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
/* BGRA */
b_mask = 0xff000000;
g_mask = 0x00ff0000;
spe_comment(f, 0, "Fetch Z/stencil quad from tile");
switch(zs_format) {
- case PIPE_FORMAT_S8Z24_UNORM: /* fall through */
- case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM: /* fall through */
+ case PIPE_FORMAT_Z24X8_UNORM:
/* prepare mask to extract Z vals from ZS vals */
spe_load_uint(f, zmask_reg, 0x00ffffff);
spe_rotmi(f, fbS_reg, fbZS_reg, -24);
break;
- case PIPE_FORMAT_Z24S8_UNORM: /* fall through */
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM: /* fall through */
+ case PIPE_FORMAT_X8Z24_UNORM:
/* convert fragment Z from [0,1] to 32-bit ints */
spe_cfltu(f, fragZ_reg, fragZ_reg, 32);
* fbS_reg has four 8-bit Z values in bits [7..0].
*/
spe_comment(f, 0, "Store quad's depth/stencil values in tile");
- if (zs_format == PIPE_FORMAT_S8Z24_UNORM ||
- zs_format == PIPE_FORMAT_X8Z24_UNORM) {
+ if (zs_format == PIPE_FORMAT_Z24S8_UNORM ||
+ zs_format == PIPE_FORMAT_Z24X8_UNORM) {
spe_shli(f, fbS_reg, fbS_reg, 24); /* fbS = fbS << 24 */
spe_or(f, fbZS_reg, fbS_reg, fbZ_reg); /* fbZS = fbS | fbZ */
}
- else if (zs_format == PIPE_FORMAT_Z24S8_UNORM ||
- zs_format == PIPE_FORMAT_Z24X8_UNORM) {
+ else if (zs_format == PIPE_FORMAT_S8Z24_UNORM ||
+ zs_format == PIPE_FORMAT_X8Z24_UNORM) {
spe_shli(f, fbZ_reg, fbZ_reg, 8); /* fbZ = fbZ << 8 */
spe_or(f, fbZS_reg, fbS_reg, fbZ_reg); /* fbZS = fbS | fbZ */
}
* code before the fragment shader to cull fragments/quads that are
* totally occluded/discarded.
*
- * XXX we only support PIPE_FORMAT_Z24S8_UNORM z/stencil buffer right now.
+ * XXX we only support PIPE_FORMAT_S8Z24_UNORM z/stencil buffer right now.
*
* See the spu_default_fragment_ops() function to see how the per-fragment
* operations would be done with ordinary C code.
if (spu.depth_stencil_alpha.stencil[0].enabled) {
/* do stencil test */
- ASSERT(spu.fb.depth_format == PIPE_FORMAT_S8Z24_UNORM);
+ ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z24S8_UNORM);
}
else if (spu.depth_stencil_alpha.depth.enabled) {
/* do depth test */
- ASSERT(spu.fb.depth_format == PIPE_FORMAT_S8Z24_UNORM ||
- spu.fb.depth_format == PIPE_FORMAT_X8Z24_UNORM);
+ ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z24S8_UNORM ||
+ spu.fb.depth_format == PIPE_FORMAT_Z24X8_UNORM);
vector unsigned int ifragZ;
vector unsigned int zmask;
{
vector float temp[4]; /* float colors in AOS form */
switch (spu.fb.color_format) {
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
temp[0] = spu_unpack_B8G8R8A8(fbc0);
temp[1] = spu_unpack_B8G8R8A8(fbc1);
temp[2] = spu_unpack_B8G8R8A8(fbc2);
temp[3] = spu_unpack_B8G8R8A8(fbc3);
break;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
temp[0] = spu_unpack_A8R8G8B8(fbc0);
temp[1] = spu_unpack_A8R8G8B8(fbc1);
temp[2] = spu_unpack_A8R8G8B8(fbc2);
* Pack fragment float colors into 32-bit RGBA words.
*/
switch (spu.fb.color_format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
fragc0 = spu_pack_A8R8G8B8(frag_aos[0]);
fragc1 = spu_pack_A8R8G8B8(frag_aos[1]);
fragc2 = spu_pack_A8R8G8B8(frag_aos[2]);
fragc3 = spu_pack_A8R8G8B8(frag_aos[3]);
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
fragc0 = spu_pack_B8G8R8A8(frag_aos[0]);
fragc1 = spu_pack_B8G8R8A8(frag_aos[1]);
fragc2 = spu_pack_B8G8R8A8(frag_aos[2]);
/* Form bitmask depending on color buffer format and colormask bits */
switch (spu.fb.color_format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
if (spu.blend.rt[0].colormask & PIPE_MASK_R)
cmask |= 0x00ff0000; /* red */
if (spu.blend.rt[0].colormask & PIPE_MASK_G)
if (spu.blend.rt[0].colormask & PIPE_MASK_A)
cmask |= 0xff000000; /* alpha */
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
if (spu.blend.rt[0].colormask & PIPE_MASK_R)
cmask |= 0x0000ff00; /* red */
if (spu.blend.rt[0].colormask & PIPE_MASK_G)