mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 06:50:11 +01:00
cell: implement logicop/output for PIPE_FORMAT_B8G8R8A8_UNORM
Remote display to my usual terminal shows the right colors again. Not 100% sure about the shuffle control words, but they seem to work.
This commit is contained in:
parent
8a81429fa8
commit
ab8bcc4ec6
1 changed files with 26 additions and 10 deletions
|
|
@ -1164,7 +1164,7 @@ int PC_OFFSET(const struct spe_function *f, const void *d)
|
||||||
* masking.
|
* masking.
|
||||||
*
|
*
|
||||||
* \bug
|
* \bug
|
||||||
* This routine is hard-coded to only work with ARGB8 data.
|
* Only two framebuffer formats are supported at this time.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cell_generate_logic_op(struct spe_function *f, struct pipe_blend_state *blend,
|
cell_generate_logic_op(struct spe_function *f, struct pipe_blend_state *blend,
|
||||||
|
|
@ -1235,15 +1235,31 @@ cell_generate_logic_op(struct spe_function *f, struct pipe_blend_state *blend,
|
||||||
|
|
||||||
/* Convert fragment colors to framebuffer format in AoS layout.
|
/* Convert fragment colors to framebuffer format in AoS layout.
|
||||||
*/
|
*/
|
||||||
data[0] = 0x00010203;
|
switch (surf->format) {
|
||||||
data[1] = 0x10111213;
|
case PIPE_FORMAT_A8R8G8B8_UNORM:
|
||||||
data[2] = 0x04050607;
|
data[0] = 0x00010203;
|
||||||
data[3] = 0x14151617;
|
data[1] = 0x10111213;
|
||||||
|
data[2] = 0x04050607;
|
||||||
data[4] = 0x0c000408;
|
data[3] = 0x14151617;
|
||||||
data[5] = 0x80808080;
|
data[4] = 0x0c000408;
|
||||||
data[6] = 0x80808080;
|
data[5] = 0x80808080;
|
||||||
data[7] = 0x80808080;
|
data[6] = 0x80808080;
|
||||||
|
data[7] = 0x80808080;
|
||||||
|
break;
|
||||||
|
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
||||||
|
data[0] = 0x03020100;
|
||||||
|
data[1] = 0x13121110;
|
||||||
|
data[2] = 0x07060504;
|
||||||
|
data[3] = 0x17161514;
|
||||||
|
data[4] = 0x0804000c;
|
||||||
|
data[5] = 0x80808080;
|
||||||
|
data[6] = 0x80808080;
|
||||||
|
data[7] = 0x80808080;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fprintf(stderr, "CELL: Bad pixel format in cell_generate_logic_op()");
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
|
||||||
spe_ilh(f, tmp[0], 0x0808);
|
spe_ilh(f, tmp[0], 0x0808);
|
||||||
spe_lqr(f, shuf_xpose_hi, PC_OFFSET(f, data+0));
|
spe_lqr(f, shuf_xpose_hi, PC_OFFSET(f, data+0));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue