Mesa (master): i965/vs: Move struct brw_compile (p) entirely inside vec4_generator.
Kenneth Graunke
kwg at kemper.freedesktop.org
Thu Nov 29 02:17:13 UTC 2012
Module: Mesa
Branch: master
Commit: c1023608002c985b9d72edc64732cd666de2a206
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c1023608002c985b9d72edc64732cd666de2a206
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Nov 27 00:16:05 2012 -0800
i965/vs: Move struct brw_compile (p) entirely inside vec4_generator.
The brw_compile structure contains the brw_instruction store and the
brw_eu_emit.c state tracking fields. These are only useful for the
final assembly generation pass; the earlier compilation stages doesn't
need them.
This also means that the code generator for future hardware won't have
access to the brw_compile structure, which is extremely desirable
because it prevents accidental generation of Gen4-7 code.
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
---
src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 --
src/mesa/drivers/dri/i965/brw_vec4_emit.cpp | 4 +++-
src/mesa/drivers/dri/i965/brw_vs.h | 1 -
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index d705235..34c34d7 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1136,8 +1136,6 @@ brw_vs_emit(struct brw_context *brw,
bool start_busy = false;
float start_time = 0;
- brw_init_compile(brw, &c->func, mem_ctx);
-
if (unlikely(INTEL_DEBUG & DEBUG_PERF)) {
start_busy = (intel->batch.last_bo &&
drm_intel_bo_busy(intel->batch.last_bo));
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
index c033804..12694e2 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
@@ -140,7 +140,9 @@ vec4_generator::vec4_generator(struct brw_context *brw,
{
intel = &brw->intel;
vp = &c->vp->program;
- p = &c->func;
+
+ p = rzalloc(mem_ctx, struct brw_compile);
+ brw_init_compile(brw, p, mem_ctx);
}
vec4_generator::~vec4_generator()
diff --git a/src/mesa/drivers/dri/i965/brw_vs.h b/src/mesa/drivers/dri/i965/brw_vs.h
index 7ac1775..75c8a5f 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.h
+++ b/src/mesa/drivers/dri/i965/brw_vs.h
@@ -94,7 +94,6 @@ struct brw_vs_prog_key {
struct brw_vs_compile {
- struct brw_compile func;
struct brw_vs_prog_key key;
struct brw_vs_prog_data prog_data;
More information about the mesa-commit
mailing list