r300/compiler: Print immediate values after "dead constants" pass
This commit is contained in:
parent
798355d429
commit
a716952184
|
@ -28,6 +28,7 @@
|
|||
#include "radeon_code.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "radeon_program.h"
|
||||
|
@ -171,3 +172,16 @@ unsigned rc_constants_add_immediate_scalar(struct rc_constant_list * c, float da
|
|||
|
||||
return rc_constants_add(c, &constant);
|
||||
}
|
||||
|
||||
void rc_constants_print(struct rc_constant_list * c)
|
||||
{
|
||||
unsigned int i;
|
||||
for(i = 0; i < c->Count; i++) {
|
||||
if (c->Constants[i].Type == RC_CONSTANT_IMMEDIATE) {
|
||||
float * values = c->Constants[i].u.Immediate;
|
||||
fprintf(stderr, "CONST[%u] = "
|
||||
"{ %10.4f %10.4f %10.4f %10.4f }\n",
|
||||
i, values[0],values[1], values[2], values[3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,6 +90,7 @@ unsigned rc_constants_add(struct rc_constant_list * c, struct rc_constant * cons
|
|||
unsigned rc_constants_add_state(struct rc_constant_list * c, unsigned state1, unsigned state2);
|
||||
unsigned rc_constants_add_immediate_vec4(struct rc_constant_list * c, const float * data);
|
||||
unsigned rc_constants_add_immediate_scalar(struct rc_constant_list * c, float data, unsigned * swizzle);
|
||||
void rc_constants_print(struct rc_constant_list * c);
|
||||
|
||||
/**
|
||||
* Compare functions.
|
||||
|
|
|
@ -146,4 +146,7 @@ void rc_remove_unused_constants(struct radeon_compiler *c, void *user)
|
|||
|
||||
free(const_used);
|
||||
free(inv_remap_table);
|
||||
|
||||
if (c->Debug)
|
||||
rc_constants_print(&c->Program.Constants);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue