cell: Minor changes to make stencil not crash
I'm not sure these are quite correct. The reflect demo doesn't assert anymore, but it doesn't produce correct results either. SPE-based vertex shader code needs to be disabled for relfect to run.
This commit is contained in:
parent
f432ac5a11
commit
5fdaebc51c
|
@ -218,12 +218,18 @@ cmd_state_framebuffer(const struct cell_command_framebuffer *cmd)
|
|||
spu.fb.width_tiles = (spu.fb.width + TILE_SIZE - 1) / TILE_SIZE;
|
||||
spu.fb.height_tiles = (spu.fb.height + TILE_SIZE - 1) / TILE_SIZE;
|
||||
|
||||
if (spu.fb.depth_format == PIPE_FORMAT_Z32_UNORM)
|
||||
switch (spu.fb.depth_format) {
|
||||
case PIPE_FORMAT_Z32_UNORM:
|
||||
case PIPE_FORMAT_Z24S8_UNORM:
|
||||
spu.fb.zsize = 4;
|
||||
else if (spu.fb.depth_format == PIPE_FORMAT_Z16_UNORM)
|
||||
break;
|
||||
case PIPE_FORMAT_Z16_UNORM:
|
||||
spu.fb.zsize = 2;
|
||||
else
|
||||
break;
|
||||
default:
|
||||
spu.fb.zsize = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (spu.fb.color_format == PIPE_FORMAT_A8R8G8B8_UNORM)
|
||||
spu.color_shuffle = ((vector unsigned char) {
|
||||
|
|
|
@ -56,13 +56,13 @@ clear_c_tile(tile_t *ctile)
|
|||
static INLINE void
|
||||
clear_z_tile(tile_t *ztile)
|
||||
{
|
||||
if (spu.fb.depth_format == PIPE_FORMAT_Z16_UNORM) {
|
||||
if (spu.fb.zsize == 2) {
|
||||
memset16((ushort*) ztile->us,
|
||||
spu.fb.depth_clear_value,
|
||||
TILE_SIZE * TILE_SIZE);
|
||||
}
|
||||
else {
|
||||
ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z32_UNORM);
|
||||
ASSERT(spu.fb.zsize != 0);
|
||||
memset32((uint*) ztile->ui,
|
||||
spu.fb.depth_clear_value,
|
||||
TILE_SIZE * TILE_SIZE);
|
||||
|
|
Loading…
Reference in New Issue