CELL: fix stencil twiddling, stencil invert
Many stencil tests were failing because of a failure to read the stencil buffer, due to "twiddling" (or "untwiddling") "an unsupported texture format". This is fixed for the case of a stencil/Z S824Z format (which twiddles just like the 32-bit color formats). tests/stencilwrap.c was failing on the GL_INVERT test, because the emitted code for "spe_xori" turned out not to be an actual "xori" instruction, but rather a "stqd" instruction, because of a typo in the rtasm code. This is now fixed, and tests/stencil_wrap now works.
This commit is contained in:
@@ -214,9 +214,9 @@ EMIT_RI10s(spe_orhi, 0x005)
|
||||
EMIT_RI10s(spe_ori, 0x004)
|
||||
EMIT_R (spe_orx, 0x1f0)
|
||||
EMIT_RR (spe_xor, 0x241)
|
||||
EMIT_RI10s(spe_xorbi, 0x026)
|
||||
EMIT_RI10s(spe_xorhi, 0x025)
|
||||
EMIT_RI10s(spe_xori, 0x024)
|
||||
EMIT_RI10s(spe_xorbi, 0x046)
|
||||
EMIT_RI10s(spe_xorhi, 0x045)
|
||||
EMIT_RI10s(spe_xori, 0x044)
|
||||
EMIT_RR (spe_nand, 0x0c9)
|
||||
EMIT_RR (spe_nor, 0x049)
|
||||
EMIT_RR (spe_eqv, 0x249)
|
||||
|
||||
@@ -314,6 +314,7 @@ cell_twiddle_texture(struct pipe_screen *screen,
|
||||
switch (ct->base.format) {
|
||||
case PIPE_FORMAT_A8R8G8B8_UNORM:
|
||||
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
||||
case PIPE_FORMAT_S8Z24_UNORM:
|
||||
{
|
||||
int numFaces = ct->base.target == PIPE_TEXTURE_CUBE ? 6 : 1;
|
||||
int offset = bufWidth * bufHeight * 4 * surface->face;
|
||||
@@ -337,7 +338,7 @@ cell_twiddle_texture(struct pipe_screen *screen,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
printf("Cell: twiddle unsupported texture format\n");
|
||||
printf("Cell: twiddle unsupported texture format 0x%x\n", ct->base.format);
|
||||
;
|
||||
}
|
||||
|
||||
@@ -363,6 +364,7 @@ cell_untwiddle_texture(struct pipe_screen *screen,
|
||||
switch (ct->base.format) {
|
||||
case PIPE_FORMAT_A8R8G8B8_UNORM:
|
||||
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
||||
case PIPE_FORMAT_S8Z24_UNORM:
|
||||
{
|
||||
int numFaces = ct->base.target == PIPE_TEXTURE_CUBE ? 6 : 1;
|
||||
int offset = surface->stride * texHeight * 4 * surface->face;
|
||||
@@ -382,7 +384,7 @@ cell_untwiddle_texture(struct pipe_screen *screen,
|
||||
default:
|
||||
{
|
||||
ct->untiled_data[level] = NULL;
|
||||
printf("Cell: untwiddle unsupported texture format\n");
|
||||
printf("Cell: untwiddle unsupported texture format 0x%x\n", ct->base.format);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user