i965: Move brw->precompile checks out a level.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Nov 2014 07:08:10 +0000 (23:08 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Nov 2014 23:30:09 +0000 (15:30 -0800)
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@whitecape.org>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_shader.cpp

index 10f8db7e998df831c488be99b2b0ce132ad0b76d..78db48420b44e2d5232cab72d5a45aa959af72ff 100644 (file)
@@ -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;