[Mesa-dev] [PATCH 35/38] i965/fs: Migrate test_fs_saturate_propagation to the IR builder.
Matt Turner
mattst88 at gmail.com
Thu Jun 4 16:51:57 PDT 2015
On Thu, Jun 4, 2015 at 9:05 AM, Francisco Jerez <currojerez at riseup.net> wrote:
> ---
> .../dri/i965/test_fs_saturate_propagation.cpp | 57 +++++++++++++---------
> 1 file changed, 34 insertions(+), 23 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp b/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp
> index 8b1fab0..f4ec432 100644
> --- a/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp
> +++ b/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp
> @@ -26,6 +26,8 @@
> #include "brw_cfg.h"
> #include "program/program.h"
>
> +using namespace brw;
> +
> class saturate_propagation_test : public ::testing::Test {
> virtual void SetUp();
>
> @@ -101,12 +103,13 @@ saturate_propagation(fs_visitor *v)
>
> TEST_F(saturate_propagation_test, basic)
> {
> + const fs_builder &bld = v->bld;
> fs_reg dst0 = v->vgrf(glsl_type::float_type);
> fs_reg dst1 = v->vgrf(glsl_type::float_type);
> fs_reg src0 = v->vgrf(glsl_type::float_type);
> fs_reg src1 = v->vgrf(glsl_type::float_type);
> - v->emit(BRW_OPCODE_ADD, dst0, src0, src1);
> - v->emit(BRW_OPCODE_MOV, dst1, dst0)
> + bld.emit(BRW_OPCODE_ADD, dst0, src0, src1);
> + bld.emit(BRW_OPCODE_MOV, dst1, dst0)
> ->saturate = true;
bld.ADD, set_saturate(true, bld.MOV). Same thing elsewhere in this patch.
More information about the mesa-dev
mailing list