struct brw_wm_compile *c;
struct gl_shader_program *prog;
- struct gl_shader *shader;
const struct gl_fragment_program *fp;
unsigned dispatch_width; /**< 8 or 16 */
{
ctx = &brw->ctx;
- shader = prog ? prog->_LinkedShaders[MESA_SHADER_FRAGMENT] : NULL;
-
mem_ctx = c;
p = rzalloc(mem_ctx, struct brw_compile);
const void *last_annotation_ir = NULL;
if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
- if (shader) {
+ if (prog) {
printf("Native code for fragment shader %d (SIMD%d dispatch):\n",
prog->Name, dispatch_width);
} else if (fp) {
last_annotation_ir = inst->ir;
if (last_annotation_ir) {
printf(" ");
- if (shader)
+ if (prog)
((ir_instruction *)inst->ir)->print();
else {
const prog_instruction *fpi;
struct brw_compile *p;
struct gl_shader_program *shader_prog;
- struct gl_shader *shader;
const struct gl_program *prog;
struct brw_vec4_prog_data *prog_data;
: brw(brw), shader_prog(shader_prog), prog(prog), prog_data(prog_data),
mem_ctx(mem_ctx), debug_flag(debug_flag)
{
- shader = shader_prog ? shader_prog->_LinkedShaders[MESA_SHADER_VERTEX] : NULL;
-
p = rzalloc(mem_ctx, struct brw_compile);
brw_init_compile(brw, p, mem_ctx);
}
const void *last_annotation_ir = NULL;
if (unlikely(debug_flag)) {
- if (shader) {
+ if (prog) {
printf("Native code for vertex shader %d:\n", shader_prog->Name);
} else {
printf("Native code for vertex program %d:\n", prog->Id);
last_annotation_ir = inst->ir;
if (last_annotation_ir) {
printf(" ");
- if (shader) {
+ if (prog) {
((ir_instruction *) last_annotation_ir)->print();
} else {
const prog_instruction *vpi;
: gen8_generator(brw, shader_prog, fp ? &fp->Base : NULL, c), c(c), fp(fp),
dual_source_output(dual_source_output)
{
- shader =
- shader_prog ? shader_prog->_LinkedShaders[MESA_SHADER_FRAGMENT] : NULL;
}
gen8_fs_generator::~gen8_fs_generator()
const void *last_annotation_ir = NULL;
if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
- if (shader) {
+ if (prog) {
printf("Native code for fragment shader %d (SIMD%d dispatch):\n",
shader_prog->Name, dispatch_width);
} else if (fp) {
last_annotation_ir = ir->ir;
if (last_annotation_ir) {
printf(" ");
- if (shader) {
+ if (prog) {
((ir_instruction *) ir->ir)->print();
} else if (prog) {
const prog_instruction *fpi;
gen8_instruction *next_inst(unsigned opcode);
struct gl_shader_program *shader_prog;
- struct gl_shader *shader;
struct gl_program *prog;
struct brw_context *brw;
prog_data(prog_data),
debug_flag(debug_flag)
{
- shader = shader_prog ? shader_prog->_LinkedShaders[MESA_SHADER_VERTEX] : NULL;
}
gen8_vec4_generator::~gen8_vec4_generator()
const void *last_annotation_ir = NULL;
if (unlikely(debug_flag)) {
- if (shader) {
+ if (prog) {
printf("Native code for vertex shader %d:\n", shader_prog->Name);
} else {
printf("Native code for vertex program %d:\n", prog->Id);
last_annotation_ir = ir->ir;
if (last_annotation_ir) {
printf(" ");
- if (shader) {
+ if (prog) {
((ir_instruction *) last_annotation_ir)->print();
} else {
const prog_instruction *vpi;