summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-05-15 14:12:48 -0700
committerKenneth Graunke <[email protected]>2014-05-18 23:35:17 -0700
commit3285bc97ef9f5f6bdf38ced121ddedd111a5e410 (patch)
tree43fd28987c94a9a26f2b8286865d60d81ee8944c /src/mesa
parent5b8f1a0f7c5b1412577a913d374192a2329fa615 (diff)
i965: Use brw_dump_compile for clip, SF, and old GS programs.
Looping over the instructions and calling brw_disasm doesn't handle compacted instructions. In most cases, this hasn't been a problem since we don't compact prior to Sandybridge. However, Sandybridge's transform feedback GS program should already be compacted, and so this ought to fix decoding of that. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.c5
3 files changed, 3 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c
index 1c54b918d73..a164d15998e 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.c
+++ b/src/mesa/drivers/dri/i965/brw_clip.c
@@ -55,7 +55,6 @@ static void compile_clip_prog( struct brw_context *brw,
const GLuint *program;
void *mem_ctx;
GLuint program_size;
- GLuint i;
memset(&c, 0, sizeof(c));
@@ -119,9 +118,7 @@ static void compile_clip_prog( struct brw_context *brw,
if (unlikely(INTEL_DEBUG & DEBUG_CLIP)) {
fprintf(stderr, "clip:\n");
- for (i = 0; i < program_size / sizeof(struct brw_instruction); i++)
- brw_disasm(stderr, &((struct brw_instruction *)program)[i],
- brw->gen, false);
+ brw_dump_compile(brw, c.func.store, 0, program_size, stderr);
fprintf(stderr, "\n");
}
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index eaa527f778f..72e5f5a14a8 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -135,12 +135,8 @@ static void compile_ff_gs_prog(struct brw_context *brw,
program = brw_get_program(&c.func, &program_size);
if (unlikely(INTEL_DEBUG & DEBUG_GS)) {
- int i;
-
fprintf(stderr, "gs:\n");
- for (i = 0; i < program_size / sizeof(struct brw_instruction); i++)
- brw_disasm(stderr, &((struct brw_instruction *)program)[i],
- brw->gen, false);
+ brw_dump_compile(brw, c.func.store, 0, program_size, stderr);
fprintf(stderr, "\n");
}
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index 401fa7bf45a..5556c46d377 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -54,7 +54,6 @@ static void compile_sf_prog( struct brw_context *brw,
const GLuint *program;
void *mem_ctx;
GLuint program_size;
- GLuint i;
memset(&c, 0, sizeof(c));
@@ -118,9 +117,7 @@ static void compile_sf_prog( struct brw_context *brw,
if (unlikely(INTEL_DEBUG & DEBUG_SF)) {
fprintf(stderr, "sf:\n");
- for (i = 0; i < program_size / sizeof(struct brw_instruction); i++)
- brw_disasm(stderr, &((struct brw_instruction *)program)[i],
- brw->gen, false);
+ brw_dump_compile(brw, c.func.store, 0, program_size, stderr);
fprintf(stderr, "\n");
}