Mesa (master): i965: Move brw->precompile checks out a level.

Kenneth Graunke kwg at kemper.freedesktop.org
Mon Nov 24 23:30:53 UTC 2014


Module: Mesa
Branch: master
Commit: d54925df9c9c024c06b7d54334d5e7a1035bcaf8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d54925df9c9c024c06b7d54334d5e7a1035bcaf8

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sun Nov 23 23:08:10 2014 -0800

i965: Move brw->precompile checks out a level.

brw_shader_precompile should just do a precompile; it makes more sense
for the caller to decide whether we should do one.  Simpler.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/mesa/drivers/dri/i965/brw_shader.cpp |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 10f8db7..78db484 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -59,13 +59,13 @@ brw_shader_precompile(struct gl_context *ctx, struct gl_shader_program *prog)
 {
    struct brw_context *brw = brw_context(ctx);
 
-   if (brw->precompile && !brw_fs_precompile(ctx, prog))
+   if (!brw_fs_precompile(ctx, prog))
       return false;
 
-   if (brw->precompile && !brw_gs_precompile(ctx, prog))
+   if (!brw_gs_precompile(ctx, prog))
       return false;
 
-   if (brw->precompile && !brw_vs_precompile(ctx, prog))
+   if (!brw_vs_precompile(ctx, prog))
       return false;
 
    return true;
@@ -255,7 +255,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
       }
    }
 
-   if (!brw_shader_precompile(ctx, shProg))
+   if (brw->precompile && !brw_shader_precompile(ctx, shProg))
       return false;
 
    return true;




More information about the mesa-commit mailing list