summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c18
-rw-r--r--src/mesa/drivers/dri/i915/i915_program.c22
-rw-r--r--src/mesa/drivers/dri/i915/i915_tex_layout.c2
3 files changed, 31 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index 9f12e2c632..e60157f377 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -359,9 +359,10 @@ upload_program(struct i915_fragment_program *p)
}
if (program->Base.NumInstructions > I915_MAX_INSN) {
- i915_program_error( p, "Exceeded max instructions" );
- return;
- }
+ i915_program_error(p, "Exceeded max instructions (%d out of %d)",
+ program->Base.NumInstructions, I915_MAX_INSN);
+ return;
+ }
/* Not always needed:
*/
@@ -1099,12 +1100,23 @@ translate_program(struct i915_fragment_program *p)
{
struct i915_context *i915 = I915_CONTEXT(p->ctx);
+ if (INTEL_DEBUG & DEBUG_WM) {
+ printf("fp:\n");
+ _mesa_print_program(&p->ctx->FragmentProgram._Current->Base);
+ printf("\n");
+ }
+
i915_init_program(i915, p);
check_wpos(p);
upload_program(p);
fixup_depth_write(p);
i915_fini_program(p);
+ if (INTEL_DEBUG & DEBUG_WM) {
+ printf("i915:\n");
+ i915_disassemble_program(i915->state.Program, i915->state.ProgramSize);
+ }
+
p->translated = 1;
}
diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c
index 3902c69097..670c713785 100644
--- a/src/mesa/drivers/dri/i915/i915_program.c
+++ b/src/mesa/drivers/dri/i915/i915_program.c
@@ -494,17 +494,25 @@ i915_fini_program(struct i915_fragment_program *p)
GLuint program_size = p->csr - p->program;
GLuint decl_size = p->decl - p->declarations;
- if (p->nr_tex_indirect > I915_MAX_TEX_INDIRECT)
- i915_program_error(p, "Exceeded max nr indirect texture lookups");
+ if (p->nr_tex_indirect > I915_MAX_TEX_INDIRECT) {
+ i915_program_error(p, "Exceeded max nr indirect texture lookups "
+ "(%d out of %d)",
+ p->nr_tex_indirect, I915_MAX_TEX_INDIRECT);
+ }
- if (p->nr_tex_insn > I915_MAX_TEX_INSN)
- i915_program_error(p, "Exceeded max TEX instructions");
+ if (p->nr_tex_insn > I915_MAX_TEX_INSN) {
+ i915_program_error(p, "Exceeded max TEX instructions (%d out of %d)",
+ p->nr_tex_insn, I915_MAX_TEX_INSN);
+ }
if (p->nr_alu_insn > I915_MAX_ALU_INSN)
- i915_program_error(p, "Exceeded max ALU instructions");
+ i915_program_error(p, "Exceeded max ALU instructions (%d out of %d)",
+ p->nr_alu_insn, I915_MAX_ALU_INSN);
- if (p->nr_decl_insn > I915_MAX_DECL_INSN)
- i915_program_error(p, "Exceeded max DECL instructions");
+ if (p->nr_decl_insn > I915_MAX_DECL_INSN) {
+ i915_program_error(p, "Exceeded max DECL instructions (%d out of %d)",
+ p->nr_decl_insn, I915_MAX_DECL_INSN);
+ }
if (p->error) {
p->FragProg.Base.NumNativeInstructions = 0;
diff --git a/src/mesa/drivers/dri/i915/i915_tex_layout.c b/src/mesa/drivers/dri/i915/i915_tex_layout.c
index af9c7ee9b6..6e4512129c 100644
--- a/src/mesa/drivers/dri/i915/i915_tex_layout.c
+++ b/src/mesa/drivers/dri/i915/i915_tex_layout.c
@@ -483,7 +483,7 @@ i945_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree * mt,
case GL_TEXTURE_1D:
case GL_TEXTURE_2D:
case GL_TEXTURE_RECTANGLE_ARB:
- i945_miptree_layout_2d(intel, mt, tiling);
+ i945_miptree_layout_2d(intel, mt, tiling, 1);
break;
default:
_mesa_problem(NULL, "Unexpected tex target in i945_miptree_layout()");