Re: [Mesa-dev] [PATCH] ac/nir: fix txf_ms with an offset

2019-07-21 Thread Bas Nieuwenhuizen
r-b

On Fri, Jul 19, 2019 at 9:19 PM Rhys Perry  wrote:
>
> Seems to fix some hair artifacts in Max Payne 3:
> https://github.com/daniel-schuermann/mesa/issues/76
>
> Signed-off-by: Rhys Perry 
> Fixes: f4e499ec791 ('radv: add initial non-conformant radv vulkan driver')
> ---
>  src/amd/common/ac_nir_to_llvm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 96bf89a8bf9..549a26ea243 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -3784,7 +3784,7 @@ static void visit_tex(struct ac_nir_context *ctx, 
> nir_tex_instr *instr)
> goto write_result;
> }
>
> -   if (args.offset && instr->op != nir_texop_txf) {
> +   if (args.offset && instr->op != nir_texop_txf && instr->op != 
> nir_texop_txf_ms) {
> LLVMValueRef offset[3], pack;
> for (unsigned chan = 0; chan < 3; ++chan)
> offset[chan] = ctx->ac.i32_0;
> @@ -3919,7 +3919,7 @@ static void visit_tex(struct ac_nir_context *ctx, 
> nir_tex_instr *instr)
> args.coords[sample_chan], fmask_ptr);
> }
>
> -   if (args.offset && instr->op == nir_texop_txf) {
> +   if (args.offset && (instr->op == nir_texop_txf || instr->op == 
> nir_texop_txf_ms)) {
> int num_offsets = 
> instr->src[offset_src].src.ssa->num_components;
> num_offsets = MIN2(num_offsets, instr->coord_components);
> for (unsigned i = 0; i < num_offsets; ++i) {
> --
> 2.21.0
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 7/7] radv/gfx10: update descriptors for inline uniform blocks

2019-07-21 Thread Bas Nieuwenhuizen
On Thu, Jul 18, 2019 at 3:51 PM Samuel Pitoiset
 wrote:
>
> Signed-off-by: Samuel Pitoiset 
> ---
>  src/amd/vulkan/radv_nir_to_llvm.c | 13 ++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_nir_to_llvm.c 
> b/src/amd/vulkan/radv_nir_to_llvm.c
> index 6feb55e3916..19dcae3a476 100644
> --- a/src/amd/vulkan/radv_nir_to_llvm.c
> +++ b/src/amd/vulkan/radv_nir_to_llvm.c
> @@ -1373,9 +1373,16 @@ radv_load_resource(struct ac_shader_abi *abi, 
> LLVMValueRef index,
> uint32_t desc_type = S_008F0C_DST_SEL_X(V_008F0C_SQ_SEL_X) |
> S_008F0C_DST_SEL_Y(V_008F0C_SQ_SEL_Y) |
> S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) |
> -   S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W) |
> -   S_008F0C_NUM_FORMAT(V_008F0C_BUF_NUM_FORMAT_FLOAT) |
> -   S_008F0C_DATA_FORMAT(V_008F0C_BUF_DATA_FORMAT_32);
> +   S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W);
> +
> +   if (ctx->ac.chip_class >= GFX10) {
> +   desc_type |= 
> S_008F0C_FORMAT(V_008F0C_IMG_FORMAT_32_FLOAT) |
> +S_008F0C_OOB_SELECT(3) |

We really should get some enum/define values for OOB_SELECT.

Anyway, not a blocker

Reviewed-by: Bas Nieuwenhuizen 

for the series
> +S_008F0C_RESOURCE_LEVEL(1);
> +   } else {
> +   desc_type |= 
> S_008F0C_NUM_FORMAT(V_008F0C_BUF_NUM_FORMAT_FLOAT) |
> +
> S_008F0C_DATA_FORMAT(V_008F0C_BUF_DATA_FORMAT_32);
> +   }
>
> LLVMValueRef desc_components[4] = {
> LLVMBuildPtrToInt(ctx->ac.builder, desc_ptr, 
> ctx->ac.intptr, ""),
> --
> 2.22.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> 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

[Mesa-dev] [Bug 102639] BadLength (poly request too large or internal Xlib length erro

2019-07-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=102639

--- Comment #4 from sunny yadav  ---
Thanks very much to share this online game https://getrobloxfreerobux.com now
let's play and can do easy play.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [Bug 111150] [BRW] WRC 5 asserts with gallium nine and iris.

2019-07-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50

soredake  changed:

   What|Removed |Added

 CC||fds...@krutt.org

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v6 4/5] st/dri2: Implement DRI2bufferDamageExtension

2019-07-21 Thread Qiang Yu
On Mon, Jul 15, 2019 at 8:50 PM Boris Brezillon
 wrote:
>
> From: Daniel Stone 
>
> Add a pipe_screen->set_damage_region() hook to propagate
> set-damage-region requests to the driver, it's then up to the driver to
> decide what to do with this piece of information.
>
> If the hook is left unassigned, the buffer-damage extension is
> considered unsupported.
>
> Signed-off-by: Daniel Stone 
> Signed-off-by: Boris Brezillon 
> Reviewed-by: Alyssa Rosenzweig 
> ---
> Hello Qiang,
>
> I intentionally dropped your R-b/T-b on this patch since the
> ->set_damage_region() prototype has changed. Feel free to add it back.
>
> Regards,
>
> Boris
>
> Changes in v6:
> * Pass pipe_box objects instead ints
> * Document the set_damage_region() hook
>
> Changes in v5:
> * Add Alyssa's R-b
> ---
>  src/gallium/include/pipe/p_screen.h   | 17 ++
>  src/gallium/state_trackers/dri/dri2.c | 34 +++
>  2 files changed, 51 insertions(+)
>
> diff --git a/src/gallium/include/pipe/p_screen.h 
> b/src/gallium/include/pipe/p_screen.h
> index 3f9bad470950..11a6aa939124 100644
> --- a/src/gallium/include/pipe/p_screen.h
> +++ b/src/gallium/include/pipe/p_screen.h
> @@ -464,6 +464,23 @@ struct pipe_screen {
> bool (*is_parallel_shader_compilation_finished)(struct pipe_screen 
> *screen,
> void *shader,
> unsigned shader_type);
> +
> +   /**
> +* Set the damage region (called when KHR_partial_update() is invoked).
> +* This function is passed an array of rectangles encoding the damage 
> area.
> +* rects are using the bottom-left origin convention.
> +* nrects = 0 means 'reset the damage region'. What 'reset' implies is HW
> +* specific. For tile-based renderers, the damage extent is typically set
> +* to cover the whole resource with no damage rect (or a 0-size damage
> +* rect). This way, the existing resource content is reloaded into the
> +* local tile buffer for every tile thus making partial tile update
> +* possible. For HW operating in immediate mode, this reset operation is
> +* likely to be a NOOP.
> +*/
> +   void (*set_damage_region)(struct pipe_screen *screen,
> + struct pipe_resource *resource,
> + unsigned int nrects,
> + const struct pipe_box *rects);
>  };
>
>
> diff --git a/src/gallium/state_trackers/dri/dri2.c 
> b/src/gallium/state_trackers/dri/dri2.c
> index 5a7ec878bab0..5273b95cd5fb 100644
> --- a/src/gallium/state_trackers/dri/dri2.c
> +++ b/src/gallium/state_trackers/dri/dri2.c
> @@ -1807,6 +1807,35 @@ static const __DRI2interopExtension 
> dri2InteropExtension = {
> .export_object = dri2_interop_export_object
>  };
>
> +/**
> + * \brief the DRI2bufferDamageExtension set_damage_region method
> + */
> +static void
> +dri2_set_damage_region(__DRIdrawable *dPriv, unsigned int nrects, int *rects)
> +{
> +   struct dri_drawable *drawable = dri_drawable(dPriv);
> +   struct pipe_resource *resource = 
> drawable->textures[ST_ATTACHMENT_BACK_LEFT];
> +   struct pipe_screen *screen = resource->screen;
> +   struct pipe_box *boxes = NULL;
> +
> +   if (nrects) {
> +  boxes = CALLOC(nrects, sizeof(*boxes));
> +  assert(boxes);

Where does this boxes array get freed? I can't find in your patch 6 either.
In fact I prefer the v5 way which just uses `int *rects` to avoid unnecessary
conversion.

Regards,
Qiang

> +
> +  for (unsigned int i = 0; i < nrects; i++) {
> + int *rect = [i * 4];
> +
> + u_box_2d(rect[0], rect[1], rect[2], rect[3], [i]);
> +  }
> +   }
> +
> +   screen->set_damage_region(screen, resource, nrects, boxes);
> +}
> +
> +static __DRI2bufferDamageExtension dri2BufferDamageExtension = {
> +   .base = { __DRI2_BUFFER_DAMAGE, 1 },
> +};
> +
>  /**
>   * \brief the DRI2ConfigQueryExtension configQueryb method
>   */
> @@ -1908,6 +1937,7 @@ static const __DRIextension *dri_screen_extensions[] = {
> ,
> ,
> ,
> +   ,
> ,
> ,
> ,
> @@ -1923,6 +1953,7 @@ static const __DRIextension 
> *dri_robust_screen_extensions[] = {
> ,
> ,
> ,
> +   ,
> ,
> ,
> ,
> @@ -1983,6 +2014,9 @@ dri2_init_screen(__DRIscreen * sPriv)
>}
> }
>
> +   if (pscreen->set_damage_region)
> +  dri2BufferDamageExtension.set_damage_region = dri2_set_damage_region;
> +
> if (pscreen->get_param(pscreen, PIPE_CAP_DEVICE_RESET_STATUS_QUERY)) {
>sPriv->extensions = dri_robust_screen_extensions;
>screen->has_reset_status_query = true;
> --
> 2.21.0
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev