On 02/22/2018 11:45 AM, Bas Nieuwenhuizen wrote:
Ideally we find a way to also do it for buffers, but for this series

I didn't mention it in the commit message, but yes we should.


Reviewed-by: Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl <mailto:b...@basnieuwenhuizen.nl>>

On Thu, Feb 22, 2018 at 10:25 AM, Samuel Pitoiset <samuel.pitoi...@gmail.com <mailto:samuel.pitoi...@gmail.com>> wrote:

    This disables persistence accross wavefronts.

    F1 2017 and Wolfenstein 2 appear to use some coherent images
    but this patch doesn't seem to change anything.

    Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com
    <mailto:samuel.pitoi...@gmail.com>>
    ---
      src/amd/common/ac_nir_to_llvm.c | 7 ++++---
      1 file changed, 4 insertions(+), 3 deletions(-)

    diff --git a/src/amd/common/ac_nir_to_llvm.c
    b/src/amd/common/ac_nir_to_llvm.c
    index 213306322d..99a3471305 100644
    --- a/src/amd/common/ac_nir_to_llvm.c
    +++ b/src/amd/common/ac_nir_to_llvm.c
    @@ -3657,13 +3657,13 @@ static LLVMValueRef visit_image_load(struct
    ac_nir_context *ctx,
                     res = ac_to_integer(&ctx->ac, res);
             } else {
                     LLVMValueRef da = glsl_is_array_image(type) ?
    ctx->ac.i1true : ctx->ac.i1false;
    -               LLVMValueRef glc = ctx->ac.i1false;
                     LLVMValueRef slc = ctx->ac.i1false;

                     params[0] = get_image_coords(ctx, instr);
                     params[1] = get_sampler_desc(ctx,
    instr->variables[0], AC_DESC_IMAGE, NULL, true, false);
                     params[2] = LLVMConstInt(ctx->ac.i32, 15, false);
    /* dmask */
    -               params[3] = glc;
    +               params[3] = (var->data.image._volatile ||
    var->data.image.coherent) ?
    +                           ctx->ac.i1true : ctx->ac.i1false;
                     params[4] = slc;
                     params[5] = ctx->ac.i1false;
                     params[6] = da;
    @@ -3711,7 +3711,8 @@ static void visit_image_store(struct
    ac_nir_context *ctx,
                     params[1] = get_image_coords(ctx, instr); /* coords */
                     params[2] = get_sampler_desc(ctx,
    instr->variables[0], AC_DESC_IMAGE, NULL, true, true);
                     params[3] = LLVMConstInt(ctx->ac.i32, 15, false);
    /* dmask */
    -               params[4] = glc;
    +               params[4] = (force_glc || var->data.image._volatile
    || var->data.image.coherent) ?
    +                           ctx->ac.i1true : ctx->ac.i1false;
                     params[5] = slc;
                     params[6] = ctx->ac.i1false;
                     params[7] = da;
    --
    2.16.2

    _______________________________________________
    mesa-dev mailing list
    mesa-dev@lists.freedesktop.org <mailto:mesa-dev@lists.freedesktop.org>
    https://lists.freedesktop.org/mailman/listinfo/mesa-dev
    <https://lists.freedesktop.org/mailman/listinfo/mesa-dev>


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

Reply via email to