From: Ian Romanick <ian.d.roman...@intel.com>

The only error that the vertex shader precompile could generate is
when register allocation fails.  Since i965 can spill registers, this
should never happen.  It's also not something that can cause a link
error.

Signed-off-by: Ian Romanick <ian.d.roman...@intel.com>
---
 src/mesa/drivers/dri/i965/brw_shader.cpp |    3 ---
 src/mesa/drivers/dri/i965/brw_vs.c       |   29 -----------------------------
 src/mesa/drivers/dri/i965/brw_vs.h       |    1 -
 3 files changed, 0 insertions(+), 33 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp 
b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 1845c3d..294cc73 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -70,9 +70,6 @@ brw_shader_precompile(struct gl_context *ctx, struct 
gl_shader_program *prog)
    if (brw->precompile && !brw_fs_precompile(ctx, prog))
       return false;
 
-   if (!brw_vs_precompile(ctx, prog))
-      return false;
-
    return true;
 }
 
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c 
b/src/mesa/drivers/dri/i965/brw_vs.c
index 7fc7dcc..72f2847 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -360,32 +360,3 @@ const struct brw_tracked_state brw_vs_prog = {
    },
    .emit = brw_upload_vs_prog
 };
-
-bool
-brw_vs_precompile(struct gl_context *ctx, struct gl_shader_program *prog)
-{
-   struct brw_context *brw = brw_context(ctx);
-   struct brw_vs_prog_key key;
-   uint32_t old_prog_offset = brw->vs.prog_offset;
-   struct brw_vs_prog_data *old_prog_data = brw->vs.prog_data;
-   bool success;
-
-   if (!prog->_LinkedShaders[MESA_SHADER_VERTEX])
-      return true;
-
-   struct gl_vertex_program *vp = (struct gl_vertex_program *)
-      prog->_LinkedShaders[MESA_SHADER_VERTEX]->Program;
-   struct brw_vertex_program *bvp = brw_vertex_program(vp);
-
-   memset(&key, 0, sizeof(key));
-
-   key.program_string_id = bvp->id;
-   key.clamp_vertex_color = true;
-
-   success = do_vs_prog(brw, prog, bvp, &key);
-
-   brw->vs.prog_offset = old_prog_offset;
-   brw->vs.prog_data = old_prog_data;
-
-   return success;
-}
diff --git a/src/mesa/drivers/dri/i965/brw_vs.h 
b/src/mesa/drivers/dri/i965/brw_vs.h
index 8814251..7b2bbe6 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.h
+++ b/src/mesa/drivers/dri/i965/brw_vs.h
@@ -123,6 +123,5 @@ struct brw_vs_compile {
 
 bool brw_vs_emit(struct gl_shader_program *prog, struct brw_vs_compile *c);
 void brw_old_vs_emit(struct brw_vs_compile *c);
-bool brw_vs_precompile(struct gl_context *ctx, struct gl_shader_program *prog);
 
 #endif
-- 
1.7.6.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to