mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-14 14:28:08 +02:00
Fix fragment program color output mapping (0=depth, 1=color)
This commit is contained in:
parent
29dc25bcfe
commit
703140bbd5
3 changed files with 7 additions and 7 deletions
|
|
@ -237,10 +237,10 @@ get_result_vector(struct i915_fp_compile *p,
|
||||||
switch (dest->DstRegister.File) {
|
switch (dest->DstRegister.File) {
|
||||||
case TGSI_FILE_OUTPUT:
|
case TGSI_FILE_OUTPUT:
|
||||||
switch (dest->DstRegister.Index) {
|
switch (dest->DstRegister.Index) {
|
||||||
case TGSI_ATTRIB_COLOR0:
|
case 0: /**TGSI_ATTRIB_POS:**/
|
||||||
return UREG(REG_TYPE_OC, 0);
|
|
||||||
case TGSI_ATTRIB_POS:
|
|
||||||
return UREG(REG_TYPE_OD, 0);
|
return UREG(REG_TYPE_OD, 0);
|
||||||
|
case 1: /**TGSI_ATTRIB_COLOR0:**/
|
||||||
|
return UREG(REG_TYPE_OC, 0);
|
||||||
default:
|
default:
|
||||||
i915_program_error(p, "Bad inst->DstReg.Index");
|
i915_program_error(p, "Bad inst->DstReg.Index");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -136,10 +136,10 @@ shade_quad(
|
||||||
/* run shader */
|
/* run shader */
|
||||||
tgsi_exec_machine_run( &machine );
|
tgsi_exec_machine_run( &machine );
|
||||||
|
|
||||||
/* store result color */
|
/* store result color (always in output[1]) */
|
||||||
memcpy(
|
memcpy(
|
||||||
quad->outputs.color,
|
quad->outputs.color,
|
||||||
&machine.Outputs[TGSI_ATTRIB_COLOR0].xyzw[0].f[0],
|
&machine.Outputs[1].xyzw[0].f[0],
|
||||||
sizeof( quad->outputs.color ) );
|
sizeof( quad->outputs.color ) );
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
||||||
|
|
@ -356,11 +356,11 @@ map_register_file_index(
|
||||||
* color results -> index 1, 2, ...
|
* color results -> index 1, 2, ...
|
||||||
*/
|
*/
|
||||||
if( index == FRAG_RESULT_DEPR ) {
|
if( index == FRAG_RESULT_DEPR ) {
|
||||||
mapped_index = TGSI_ATTRIB_POS;
|
mapped_index = 0; /**TGSI_ATTRIB_POS;**/
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
assert( index == FRAG_RESULT_COLR );
|
assert( index == FRAG_RESULT_COLR );
|
||||||
mapped_index = TGSI_ATTRIB_COLOR0;
|
mapped_index = 1; /**TGSI_ATTRIB_COLOR0;**/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue