diff --git a/src/intel/compiler/brw_builder.h b/src/intel/compiler/brw_builder.h index fc2e708baa2..5e9eb977038 100644 --- a/src/intel/compiler/brw_builder.h +++ b/src/intel/compiler/brw_builder.h @@ -50,7 +50,14 @@ public: { } - explicit brw_builder(brw_shader *s) : brw_builder(s, s->dispatch_width) {} + /** + * Construct an brw_builder that inserts instructions into \p shader, + * using its dispatch width. + */ + explicit brw_builder(brw_shader *s = NULL) : + brw_builder(s, s ? s->dispatch_width : 0) + { + } /** * Construct an brw_builder that inserts instructions before diff --git a/src/intel/compiler/test_lower_scoreboard.cpp b/src/intel/compiler/test_lower_scoreboard.cpp index 288e7d27ef6..48fdb70e185 100644 --- a/src/intel/compiler/test_lower_scoreboard.cpp +++ b/src/intel/compiler/test_lower_scoreboard.cpp @@ -42,7 +42,6 @@ protected: }; scoreboard_test::scoreboard_test() - : bld(NULL, 0) { ctx = ralloc_context(NULL); compiler = rzalloc(ctx, struct brw_compiler); diff --git a/src/intel/compiler/test_opt_cmod_propagation.cpp b/src/intel/compiler/test_opt_cmod_propagation.cpp index f9cc7b091d3..d4e4edc4dc7 100644 --- a/src/intel/compiler/test_opt_cmod_propagation.cpp +++ b/src/intel/compiler/test_opt_cmod_propagation.cpp @@ -53,7 +53,6 @@ protected: }; cmod_propagation_test::cmod_propagation_test() - : bld(NULL, 0) { ctx = ralloc_context(NULL); compiler = rzalloc(ctx, struct brw_compiler); diff --git a/src/intel/compiler/test_opt_combine_constants.cpp b/src/intel/compiler/test_opt_combine_constants.cpp index ec1efb2bb2e..7a6e065a143 100644 --- a/src/intel/compiler/test_opt_combine_constants.cpp +++ b/src/intel/compiler/test_opt_combine_constants.cpp @@ -68,7 +68,7 @@ struct FSCombineConstantsTest : public ::testing::Test { static brw_builder make_builder(brw_shader *s) { - return brw_builder(s, s->dispatch_width).at_end(); + return brw_builder(s).at_end(); } TEST_F(FSCombineConstantsTest, Simple) diff --git a/src/intel/compiler/test_opt_copy_propagation.cpp b/src/intel/compiler/test_opt_copy_propagation.cpp index 3b61f80f99a..430b67aa64d 100644 --- a/src/intel/compiler/test_opt_copy_propagation.cpp +++ b/src/intel/compiler/test_opt_copy_propagation.cpp @@ -42,7 +42,6 @@ protected: }; copy_propagation_test::copy_propagation_test() - : bld(NULL, 0) { ctx = ralloc_context(NULL); compiler = rzalloc(ctx, struct brw_compiler); diff --git a/src/intel/compiler/test_opt_cse.cpp b/src/intel/compiler/test_opt_cse.cpp index 6f7633a6beb..edf117662dc 100644 --- a/src/intel/compiler/test_opt_cse.cpp +++ b/src/intel/compiler/test_opt_cse.cpp @@ -24,7 +24,6 @@ protected: }; cse_test::cse_test() - : bld(NULL, 0) { ctx = ralloc_context(NULL); compiler = rzalloc(ctx, struct brw_compiler); diff --git a/src/intel/compiler/test_opt_saturate_propagation.cpp b/src/intel/compiler/test_opt_saturate_propagation.cpp index 1eb99c06fea..34e940015cd 100644 --- a/src/intel/compiler/test_opt_saturate_propagation.cpp +++ b/src/intel/compiler/test_opt_saturate_propagation.cpp @@ -42,7 +42,6 @@ protected: }; saturate_propagation_test::saturate_propagation_test() - : bld(NULL, 0) { ctx = ralloc_context(NULL); compiler = rzalloc(ctx, struct brw_compiler);