[Mesa-dev] [PATCH] anv: fix GetPhysicalDeviceProperties to return timestampPeriod in ns

2016-10-05 Thread Philipp Zabel
According to chapters 16.5. (Timestamp Queries) and 30.2 (Limits) of the Vulkan Specification 1.0.29, the .limits.timestampPeriod field returned by vkGetPhysicalDeviceProperties is measured in nanoseconds, not in seconds. Signed-off-by: Philipp Zabel --- src/intel/vulkan/anv_device.c | 2 +- 1

[Mesa-dev] [PATCH 2/4] st/dri: ask the driver to update its internal copies on reimport

2016-12-02 Thread Philipp Zabel
eated. Signed-off-by: Philipp Zabel --- src/gallium/state_trackers/dri/dri2.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 9ec069b..a216e83 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/ga

[Mesa-dev] [PATCH 3/4] etnaviv: initialize seqno of imported resources

2016-12-02 Thread Philipp Zabel
Imported resources already have contents that we want to be copied to texture resources derived from them. Set initial seqno of imported resources to 1, just as if they had already been rendered to. Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 2 ++ 1 file

[Mesa-dev] [PATCH 0/4] etnaviv: update derived texture resources of (re)imported buffers

2016-12-02 Thread Philipp Zabel
so that texture resources created from them are actually older and trigger the resolve on first use. regards Philipp Philipp Zabel (4): gallium: add pipe_screen::resource_changed st/dri: ask the driver to update its internal copies on reimport etnaviv: initialize seqno of imported resources

[Mesa-dev] [PATCH 1/4] gallium: add pipe_screen::resource_changed

2016-12-02 Thread Philipp Zabel
Add a hook to tell drivers that an imported resource may have changed and they need to update their internal derived resources. Signed-off-by: Philipp Zabel --- src/gallium/include/pipe/p_screen.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/include/pipe/p_screen.h b

[Mesa-dev] [PATCH 4/4] etnaviv: implement resource_changed to invalidate internal resources derived from imported buffers

2016-12-02 Thread Philipp Zabel
Implement the new resource_changed pipe callback to invalidate internal resources derived from imported buffers. This is needed to update the texture for re-imported renderables that may contain new contents. Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 13

Re: [Mesa-dev] [PATCH 1/4] gallium: add pipe_screen::resource_changed

2016-12-05 Thread Philipp Zabel
_buffer to a wl_surface. I see resource_changed as complementary to the resource_create / resource_from_handle functionality, which already resides in pipe_screen. regards Philipp > Marek > > On Fri, Dec 2, 2016 at 4:27 PM, Philipp Zabel wrote: > > Add a hook to tell drivers that an import

Re: [Mesa-dev] [PATCH 1/4] gallium: add pipe_screen::resource_changed

2016-12-05 Thread Philipp Zabel
Am Montag, den 05.12.2016, 11:19 +0100 schrieb Philipp Zabel: > Hi Marek, > > Am Freitag, den 02.12.2016, 23:10 +0100 schrieb Marek Olšák: > > Shouldn't this be in pipe_context if it does a copy? Actually, resource_changed is not supposed to create a copy immediately. Maybe

[Mesa-dev] [PATCH v2 0/6] etnaviv: update derived texture resources of (re)imported buffers

2016-12-05 Thread Philipp Zabel
r and trigger the resolve on first use. Changes since v1: - Clarify intended use of pipe_screen::resource_changed - Add updated GL_OES_EGL_image_external patches regards Philipp Philipp Zabel (6): gallium: add pipe_screen::resource_changed st/dri: ask the driver to update its internal copi

[Mesa-dev] [PATCH v2 3/6] etnaviv: initialize seqno of imported resources

2016-12-05 Thread Philipp Zabel
Imported resources already have contents that we want to be copied to texture resources derived from them. Set initial seqno of imported resources to 1, just as if it had already been rendered to. Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 2 ++ 1 file

[Mesa-dev] [PATCH v2 6/6] st/mesa: ask pipe driver to recreate derived internal resources when (re-)binding external textures

2016-12-05 Thread Philipp Zabel
values that correspond to the values in the external texture at or after the time that glBindTexture was called. Signed-off-by: Philipp Zabel --- src/mesa/state_tracker/st_atom_texture.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa

[Mesa-dev] [PATCH v2 2/6] st/dri: ask the driver to update its internal copies on reimport

2016-12-05 Thread Philipp Zabel
eated. Signed-off-by: Philipp Zabel --- src/gallium/state_trackers/dri/dri2.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 9ec069b..a216e83 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/ga

[Mesa-dev] [PATCH v2 5/6] mesa: update external textures when (re-)binding

2016-12-05 Thread Philipp Zabel
mesa_BindTextures if the target is external. This will later allow the state tracker to instruct the pipe driver to invalidate internal resources derived from the external texture. Signed-off-by: Philipp Zabel --- src/mesa/main/texobj.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[Mesa-dev] [PATCH v2 4/6] etnaviv: implement resource_changed to invalidate internal resources derived from imported buffers

2016-12-05 Thread Philipp Zabel
Implement the resource_changed pipe callback to invalidate internal resources derived from imported buffers. This is needed to update the texture for re-imported renderables. Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 13 + 1 file changed, 13

[Mesa-dev] [PATCH v2 1/6] gallium: add pipe_screen::resource_changed

2016-12-05 Thread Philipp Zabel
Add a hook to tell drivers that an imported resource may have changed and they need to update their internal derived resources. Signed-off-by: Philipp Zabel --- Changes since v1: - Clarified intended of pipe_screen::resource_changed --- src/gallium/include/pipe/p_screen.h | 8 1 file

[Mesa-dev] [PATCH v3 0/6] etnaviv: update derived texture resources of (re)imported buffers

2016-12-06 Thread Philipp Zabel
r and trigger the resolve on first use. Changes since v2: - Added resource_changed paragraph to screen.rst regards Philipp Philipp Zabel (6): gallium: add pipe_screen::resource_changed st/dri: ask the driver to update its internal copies on reimport etnaviv: initialize seqno of imported reso

[Mesa-dev] [PATCH v3 1/6] gallium: add pipe_screen::resource_changed

2016-12-06 Thread Philipp Zabel
Add a hook to tell drivers that an imported resource may have changed and they need to update their internal derived resources. Signed-off-by: Philipp Zabel --- Changes since v2: - Added resource_changed paragraph to screen.rst --- src/gallium/docs/source/screen.rst | 14 ++ src

[Mesa-dev] [PATCH v3 5/6] mesa: update external textures when (re-)binding

2016-12-06 Thread Philipp Zabel
mesa_BindTextures if the target is external. This will later allow the state tracker to instruct the pipe driver to invalidate internal resources derived from the external texture. Signed-off-by: Philipp Zabel --- src/mesa/main/texobj.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[Mesa-dev] [PATCH v3 4/6] etnaviv: implement resource_changed to invalidate internal resources derived from imported buffers

2016-12-06 Thread Philipp Zabel
Implement the resource_changed pipe callback to invalidate internal resources derived from imported buffers. This is needed to update the texture for re-imported renderables. Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 13 + 1 file changed, 13

[Mesa-dev] [PATCH v3 3/6] etnaviv: initialize seqno of imported resources

2016-12-06 Thread Philipp Zabel
Imported resources already have contents that we want to be copied to texture resources derived from them. Set initial seqno of imported resources to 1, just as if it had already been rendered to. Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 2 ++ 1 file

[Mesa-dev] [PATCH v3 6/6] st/mesa: ask pipe driver to recreate derived internal resources when (re-)binding external textures

2016-12-06 Thread Philipp Zabel
values that correspond to the values in the external texture at or after the time that glBindTexture was called. Signed-off-by: Philipp Zabel --- src/mesa/state_tracker/st_atom_texture.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa

[Mesa-dev] [PATCH v3 2/6] st/dri: ask the driver to update its internal copies on reimport

2016-12-06 Thread Philipp Zabel
eated. Signed-off-by: Philipp Zabel --- src/gallium/state_trackers/dri/dri2.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 9ec069b..a216e83 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/ga

[Mesa-dev] [PATCH v4 3/7] etnaviv: initialize seqno of imported resources

2016-12-06 Thread Philipp Zabel
Imported resources already have contents that we want to be copied to texture resources derived from them. Set initial seqno of imported resources to 1, just as if it had already been rendered to. Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 2 ++ 1 file

[Mesa-dev] [PATCH v4 1/7] gallium: add pipe_screen::resource_changed

2016-12-06 Thread Philipp Zabel
Add a hook to tell drivers that an imported resource may have changed and they need to update their internal derived resources. Signed-off-by: Philipp Zabel Reviewed-by: Roland Scheidegger --- src/gallium/docs/source/screen.rst | 14 ++ src/gallium/include/pipe/p_screen.h | 8

[Mesa-dev] [PATCH v4 5/7] mesa: update external textures when (re-)binding

2016-12-06 Thread Philipp Zabel
mesa_BindTextures if the target is external. This will later allow the state tracker to instruct the pipe driver to invalidate internal resources derived from the external texture. Signed-off-by: Philipp Zabel --- src/mesa/main/texobj.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[Mesa-dev] [PATCH v4 0/7] etnaviv: update derived texture resources of (re)imported buffers

2016-12-06 Thread Philipp Zabel
r and trigger the resolve on first use. Changes since v3: - Added resource_changed to ddebug, rbug, and trace wrapper drivers regards Philipp Philipp Zabel (7): gallium: add pipe_screen::resource_changed st/dri: ask the driver to update its internal copies on reimport etnaviv: initialize seq

[Mesa-dev] [PATCH v4 6/7] st/mesa: ask pipe driver to recreate derived internal resources when (re-)binding external textures

2016-12-06 Thread Philipp Zabel
values that correspond to the values in the external texture at or after the time that glBindTexture was called. Signed-off-by: Philipp Zabel --- src/mesa/state_tracker/st_atom_texture.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa

[Mesa-dev] [PATCH v4 4/7] etnaviv: implement resource_changed to invalidate internal resources derived from imported buffers

2016-12-06 Thread Philipp Zabel
Implement the resource_changed pipe callback to invalidate internal resources derived from imported buffers. This is needed to update the texture for re-imported renderables. Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 13 + 1 file changed, 13

[Mesa-dev] [PATCH v4 7/7] gallium: add pipe_screen::resource_changed callback wrappers

2016-12-06 Thread Philipp Zabel
Add resource_changed to the ddebug, rbug, and trace wrappers. Since it is optional, there is no need to add it to noop. Signed-off-by: Philipp Zabel Suggested-by: Nicolai Hähnle --- src/gallium/drivers/ddebug/dd_screen.c | 10 ++ src/gallium/drivers/rbug/rbug_screen.c | 11

[Mesa-dev] [PATCH v4 2/7] st/dri: ask the driver to update its internal copies on reimport

2016-12-06 Thread Philipp Zabel
eated. Signed-off-by: Philipp Zabel --- src/gallium/state_trackers/dri/dri2.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 9ec069b..a216e83 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/ga

Re: [Mesa-dev] [PATCH] nir: Optimize double-precision lower_round_even()

2019-01-29 Thread Philipp Zabel
On Tue, 2019-01-29 at 10:10 +0100, Erik Faye-Lund wrote: > On Mon, 2019-01-28 at 09:31 -0800, Matt Turner wrote: > > Use the trick of adding and then subtracting 2**52 (52 is the number > > of > > explicit mantissa bits a double-precision floating-point value has) > > to > > implement round-to-even

[Mesa-dev] [PATCH] anv: pCreateInfo->pApplicationInfo parameter to vkCreateInstance may be NULL

2016-02-16 Thread Philipp Zabel
Fix a NULL pointer dereference in anv_CreateInstance in case the pApplicationInfo field of the supplied VkInstanceCreateInfo structure is NULL [1]. [1] https://www.khronos.org/registry/vulkan/specs/1.0/apispec.html#VkInstanceCreateInfo Signed-off-by: Philipp Zabel --- src/vulkan/anv_device.c

[Mesa-dev] [PATCH 1/2] mesa: Allow to invalidate external textures when (re-)binding

2016-05-25 Thread Philipp Zabel
mesa_BindTextures if the target is external. Signed-off-by: Philipp Zabel --- src/mesa/main/texobj.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index c9502bd..6219617 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main

[Mesa-dev] [PATCH 2/2] st/mesa: Invalidate external textures when (re-)binding

2016-05-25 Thread Philipp Zabel
values in the external texture at or after the time that glBindTexture was called. Signed-off-by: Philipp Zabel --- src/mesa/state_tracker/st_atom_texture.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker

[Mesa-dev] [PATCH] st/dri: fix winsys handle stride calculation for block formats

2016-05-25 Thread Philipp Zabel
This fixes the stride calculation for pipe formats with a block width larger than one. Signed-off-by: Philipp Zabel --- src/gallium/state_trackers/dri/dri2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers

Re: [Mesa-dev] [PATCH 2/2] st/mesa: Invalidate external textures when (re-)binding

2016-05-25 Thread Philipp Zabel
Am Mittwoch, den 25.05.2016, 09:23 -0400 schrieb Ilia Mirkin: > Iirc invalidate_resource is to allow backend to discard the contents... Thanks, I didn't know that. So this would need a new callback then? Specifically I want to discard a copy in tiled layout that was derived from a linear external

Re: [Mesa-dev] [PATCH 1/2] gbm: Enable DRI2 fence extension in the GBM DRI backend

2016-05-25 Thread Philipp Zabel
Am Dienstag, den 10.05.2016, 17:35 +0200 schrieb Philipp Zabel: > To support the EGL_KHR_fence_sync extension on the DRM EGL platform, > add the DRI2 fence extension to the dri_core_extensions match table. > > Signed-off-by: Philipp Zabel Gentle ping. Is this about the right way t

Re: [Mesa-dev] [PATCH 1/2] gbm: Enable DRI2 fence extension in the GBM DRI backend

2016-05-25 Thread Philipp Zabel
Am Mittwoch, den 25.05.2016, 16:01 +0200 schrieb Marek Olšák: > On Wed, May 25, 2016 at 3:44 PM, Philipp Zabel wrote: > > Am Dienstag, den 10.05.2016, 17:35 +0200 schrieb Philipp Zabel: > >> To support the EGL_KHR_fence_sync extension on the DRM EGL platform, > >> add

Re: [Mesa-dev] [PATCH 1/2] gbm: Enable DRI2 fence extension in the GBM DRI backend

2016-05-26 Thread Philipp Zabel
Hi Marek, Am Mittwoch, den 25.05.2016, 20:52 +0200 schrieb Marek Olšák: > On Wed, May 25, 2016 at 4:46 PM, Philipp Zabel wrote: > > Am Mittwoch, den 25.05.2016, 16:01 +0200 schrieb Marek Olšák: > >> On Wed, May 25, 2016 at 3:44 PM, Philipp Zabel > >> wrote: > &g

Re: [Mesa-dev] [PATCH 1/2] gbm: Enable DRI2 fence extension in the GBM DRI backend

2016-05-26 Thread Philipp Zabel
Hi Emil, Am Mittwoch, den 25.05.2016, 23:42 +0100 schrieb Emil Velikov: [...] > Or in other words, in case of egl + gbm, egl inherits the screen from > the gbm device. As such platform_gbm does not call the core egl setup > function, dri2_create_screen (like everyone else does x11, wayland...) > b

Re: [Mesa-dev] [PATCH] st/dri: fix winsys handle stride calculation for block formats

2016-05-26 Thread Philipp Zabel
Hi Michel, Am Donnerstag, den 26.05.2016, 17:59 +0900 schrieb Michel Dänzer: > On 25.05.2016 22:20, Philipp Zabel wrote: > > This fixes the stride calculation for pipe formats with a block width > > larger than one. > > > > Signed-off-by: Philipp Zabel > > --

Re: [Mesa-dev] [PATCH] st/dri: fix winsys handle stride calculation for block formats

2016-05-26 Thread Philipp Zabel
Am Donnerstag, den 26.05.2016, 12:43 +0100 schrieb Emil Velikov: > Hi gents, > > On 26 May 2016 at 11:28, Philipp Zabel wrote: > > Hi Michel, > > > > Am Donnerstag, den 26.05.2016, 17:59 +0900 schrieb Michel Dänzer: > >> On 25.05.2016 22:20, Philipp Zabel

Re: [Mesa-dev] [PATCH 2/2] st/mesa: Invalidate external textures when (re-)binding

2016-05-26 Thread Philipp Zabel
Am Donnerstag, den 26.05.2016, 10:36 -0400 schrieb Ilia Mirkin: > On Thu, May 26, 2016 at 10:31 AM, Marek Olšák wrote: > > On Wed, May 25, 2016 at 3:34 PM, Philipp Zabel > > wrote: > >> Am Mittwoch, den 25.05.2016, 09:23 -0400 schrieb Ilia Mirkin: > >>>

[Mesa-dev] [PATCH] vulkan/wsi/wayland: Fix proxy wrappers for swapchain recreation

2017-05-19 Thread Philipp Zabel
between two frames without using the VkSwapchainCreateInfoKHR::oldSwapchain mechanism to keep the old swapchain until after the next redraw. Fixes: 5034c615582a ("vulkan/wsi/wayland: Use proxy wrappers for swapchain") Signed-off-by: Philipp Zabel Cc: mesa-sta...@lists.freedesktop.org --- src/

Re: [Mesa-dev] [PATCH v3 01/15] st/dri: refactor multi-planar YUV import path

2017-05-23 Thread Philipp Zabel
On Tue, 2017-05-23 at 14:40 +0530, Varad Gautam wrote: > Hi Lucas, > > On Mon, May 22, 2017 at 11:16 PM, Lucas Stach wrote: > > Am Mittwoch, den 10.05.2017, 23:15 +0530 schrieb Varad Gautam: > >> From: Varad Gautam > >> > >> we currently ignore the plane count when converting from > >> __DRI_IMA

[Mesa-dev] [RFC] etnaviv: flush color cache and depth cache together before resolves

2017-05-30 Thread Philipp Zabel
hows through. Other attempts such as adding a pipeline stall before the color flush or a TS cache flush afterwards or flushing multiple times, with stalls before and after each flush, have shown no effect. Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 13 +

Re: [Mesa-dev] [PATCH 1/6] etnaviv: always do cpu_fini in transfer_unmap

2017-05-30 Thread Philipp Zabel
xes: c9e8b49b885 ("etnaviv: gallium driver for Vivante GPUs") > Cc: mesa-sta...@lists.freedesktop.org > Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel > --- > src/gallium/drivers/etnaviv/etnaviv_transfer.c | 9 ++--- > 1 file changed, 6 insertions(+),

Re: [Mesa-dev] [PATCH 3/6] etnaviv: honor PIPE_TRANSFER_UNSYNCHRONIZED flag

2017-05-30 Thread Philipp Zabel
On Fri, 2017-05-19 at 11:41 +0200, Lucas Stach wrote: > This gets rid of quite a bit of CPU/GPU sync on frequent vertex buffer > uploads and I haven't seen any of the issues mentioned in the comment, > so this one seems stale. > > Ignore the flag if there exists a temporary resource, as those ones

Re: [Mesa-dev] [libdrm 1/4] etnaviv: submit full struct drm_etnaviv_gem_submit

2017-06-09 Thread Philipp Zabel
("drm/etnaviv: submit support for out-fences") and 9ad59fea162c ("drm/etnaviv: submit support for in-fences") to test, without ill effects. > Signed-off-by: Christian Gmeiner Reviewed-by: Philipp Zabel Tested-by: Philipp Zabel regards Philipp > --- > etnaviv/etna

Re: [Mesa-dev] [PATCH 1/2] etnaviv: fix varying interpolation

2017-06-09 Thread Philipp Zabel
On Thu, 2017-06-08 at 18:25 +0200, Lucas Stach wrote: > It seems that newer cores don't use the PA_ATTRIBUTES to decide if the > varying should bypass the flat shading, but derive this from the component > use. This fixes flat shading on GC880+. > > VARYING_COMPONENT_USE_POINTCOORD is a bit of a m

Re: [Mesa-dev] [PATCH 2/2] etnaviv: remove flat shading workaround

2017-06-09 Thread Philipp Zabel
_SHADE_MODEL_SMOOTH) | > + cs->PA_CONFIG = (so->flatshade ? VIVS_PA_CONFIG_SHADE_MODEL_FLAT : > VIVS_PA_CONFIG_SHADE_MODEL_SMOOTH) | > translate_cull_face(so->cull_face, so->front_ccw) | > translate_polygon_mode(so-&g

Re: [Mesa-dev] [PATCH 05/19] etnaviv: Use only DRAW_INSTANCED on GC3000+

2017-11-01 Thread Philipp Zabel
VIV_FE_DRAW_INSTANCED_COUNT_INSTANCE_COUNT_HI(instance_count >> 16) | > + VIV_FE_DRAW_INSTANCED_COUNT_VERTEX_COUNT(vertex_count)); > + etna_cmd_stream_emit(stream, > + VIV_FE_DRAW_INSTANCED_START_INDEX(offset)); > + etna_cmd_stream_emit(stream, 0); > +} > + > void > etna_emit_state(struct etna_context *ctx); Reviewed-by: Philipp Zabel regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 02/19] etnaviv: Const-correctness etnaviv_emit.h

2017-11-01 Thread Philipp Zabel
eloc *reloc) > { > etna_cmd_stream_reserve(stream, 2); > etna_emit_load_state(stream, address >> 2, 1, 0); Reviewed-by: Philipp Zabel regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] st/dri: allow direct YUYV import

2017-07-19 Thread Philipp Zabel
_pipe_format (int > format) > case __DRI_IMAGE_FORMAT_GR88: >pf = PIPE_FORMAT_RG88_UNORM; >break; > + case __DRI_IMAGE_FORMAT_YUYV: > + pf = PIPE_FORMAT_YUYV; > + break; > default: >pf = PIPE_FORMAT_NONE; >break; Revie

Re: [Mesa-dev] [PATCH] etnaviv: Add support for R8_UNORM textures

2017-07-28 Thread Philipp Zabel
SIGNED_BYTE, NONE), > V_(R8_SINT,BYTE, NONE), Reviewed-by: Philipp Zabel regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/2] etnaviv: fix etna_bo_from_name

2017-08-04 Thread Philipp Zabel
Look up BOs from the name table using the name parameter instead of req.handle (which at this point is always zero). Signed-off-by: Philipp Zabel --- etnaviv/etnaviv_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etnaviv/etnaviv_bo.c b/etnaviv/etnaviv_bo.c index

[Mesa-dev] [PATCH 2/2] etnaviv: add etna_bo_from_handle

2017-08-04 Thread Philipp Zabel
Although etnaviv_drmif.h declared etna_bo_from_handle from the start, there was no implementation. Signed-off-by: Philipp Zabel --- etnaviv/etnaviv_bo.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/etnaviv/etnaviv_bo.c b/etnaviv/etnaviv_bo.c index 4fe877f..7566957

Re: [Mesa-dev] [PATCH 1/2] etnaviv: fix etna_bo_from_name

2017-08-04 Thread Philipp Zabel
On Fri, 2017-08-04 at 18:15 +0200, Wladimir J. van der Laan wrote: > On Fri, Aug 04, 2017 at 05:07:54PM +0200, Philipp Zabel wrote: > > Look up BOs from the name table using the name parameter instead of > > req.handle (which at this point is always zero). > > Good ca

Re: [Mesa-dev] [PATCH] egl/dri2: Allow modifiers to add FDs to imports

2017-08-07 Thread Philipp Zabel
BufPlaneModifiersHi[i].IsPresent) { > +plane_n = i + 1; Since this increments plane_n, Should a check be added that the corresponding DMABufPlanFds[i] is present? What if there are holes in DMABufPlaneModifiersLo/Hi? > continue; > + } > > _eglErro

Re: [Mesa-dev] [PATCH] egl/dri2: Allow modifiers to add FDs to imports

2017-08-08 Thread Philipp Zabel
On Tue, 2017-08-08 at 07:29 +0300, Tapani Pälli wrote: > > On 08/07/2017 03:05 PM, Philipp Zabel wrote: > > On Mon, 2017-07-31 at 18:35 +0100, Daniel Stone wrote: > >> When using dmabuf import, make sure that the modifier is actually > >> allowed to add planes to

Re: [Mesa-dev] [PATCH v2] egl/dri2: Allow modifiers to add FDs to imports

2017-08-11 Thread Philipp Zabel
>DMABufPlaneModifiersHi[i].IsPresent) { > + plane_n = i + 1; > +  } > +   } > + Nice, this makes sure that all planes up to the last modifier have fds present. And since all fds are guaranteed to be present, the modifier equality check

[Mesa-dev] [PATCH 2/2] renderonly: drop resources on destroy

2017-04-27 Thread Philipp Zabel
The renderonly_scanout holds a reference on its prime pipe resource, which should be released when it is destroyed. If it was created by renderonly_create_kms_dumb_buffer_for_resource, the dumb BO also has to be destroyed. Signed-off-by: Philipp Zabel --- src/gallium/auxiliary/renderonly

[Mesa-dev] [PATCH 1/2] renderonly: close transfer prime_fd

2017-04-27 Thread Philipp Zabel
prime_fd is only used to transfer the scanout buffer to the GPU inside renderonly_create_kms_dumb_buffer_for_resource. It should be closed immediately to avoid leaking the DMA-BUF file handle. Signed-off-by: Philipp Zabel --- src/gallium/auxiliary/renderonly/renderonly.c | 2 ++ 1 file changed

Re: [Mesa-dev] [PATCH 2/2] renderonly: drop resources on destroy

2017-04-28 Thread Philipp Zabel
On Fri, 2017-04-28 at 11:19 +0100, Emil Velikov wrote: > On 27 April 2017 at 17:44, Philipp Zabel wrote: > > The renderonly_scanout holds a reference on its prime pipe resource, > > which should be released when it is destroyed. If it

[Mesa-dev] [PATCH] renderonly: use drmIoctl

2017-04-28 Thread Philipp Zabel
To restart interrupted system calls, use drmIoctl. Suggested-by: Emil Velikov Signed-off-by: Philipp Zabel --- Applies on top of the "renderonly: drop resources on destroy" patch: https://patchwork.freedesktop.org/patch/153274/ --- src/gallium/auxiliary/renderonly/renderonly.c | 7

[Mesa-dev] [PATCH] renderonly: use drmIoctl

2017-04-28 Thread Philipp Zabel
To restart interrupted system calls, use drmIoctl. Suggested-by: Emil Velikov Signed-off-by: Philipp Zabel --- Applies on top of the "renderonly: drop resources on destroy" patch: https://patchwork.freedesktop.org/patch/153274/ --- src/gallium/auxiliary/renderonly/renderonly.c | 7

Re: [Mesa-dev] [PATCH] etnaviv: add L8A8_UNORM texture format

2017-05-03 Thread Philipp Zabel
On Tue, 2017-05-02 at 22:06 +0200, Christian Gmeiner wrote: > No piglit regressions. > > Signed-off-by: Christian Gmeiner Reviewed-by: Philipp Zabel > --- > src/gallium/drivers/etnaviv/etnaviv_format.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src

Re: [Mesa-dev] Sampling DRM_FORMAT_YUYV in GLSL

2017-05-09 Thread Philipp Zabel
On Tue, 2017-05-09 at 12:31 +0300, Tapani Pälli wrote: > > On 05/09/2017 12:29 PM, Tapani Pälli wrote: > > > > > > On 05/09/2017 12:14 PM, Volker Vogelhuber wrote: > >> Hi, > >> > >> first sorry, for missing the subject in my mail to the mailing list, > >> then thanks > >> for the hint with the

Re: [Mesa-dev] Sampling DRM_FORMAT_YUYV in GLSL

2017-05-09 Thread Philipp Zabel
On Tue, 2017-05-09 at 12:48 +0200, Volker Vogelhuber wrote: [...] > Ok thanks for the clarification. There is only one missing part for the > GL_TEXTURE_2D case. The second EGLImage is created internally when > calling eglCreateImage with EGL_LINUX_DMA_BUF_EXT, so I only > have one return value I c

[Mesa-dev] [PATCH] configure.ac: Fix help string for --disable-pwr8 configure option

2017-05-10 Thread Philipp Zabel
Signed-off-by: Philipp Zabel --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index df3eb6b29a..5c460f43d5 100644 --- a/configure.ac +++ b/configure.ac @@ -455,7 +455,7 @@ int main () { CFLAGS=$save_CFLAGS AC_ARG_ENABLE(pwr8

Re: [Mesa-dev] [PATCH 5/5] etnaviv: increment the resource seqno in resource_changed

2017-05-11 Thread Philipp Zabel
hilipp > > On Wed, May 10, 2017 at 06:01:08PM +0200, Lucas Stach wrote: > > From: Philipp Zabel > > > > Just increment the resource seqno instead of setting the texture > > seqno to be lower by one than the resource seqno. > > > > Signed-off-by: Phi

Re: [Mesa-dev] [PATCH 3/3] etnaviv: Check extended format availability on GPU

2017-05-16 Thread Philipp Zabel
Hi Wladimir, On Tue, 2017-05-16 at 10:42 +0200, Wladimir J. van der Laan wrote: > Current information shows that both extended texture/render formats > and texture swizzling were introduced with the HALTI0 feature bit, > available on GC2000/GC3000. With this patch applied, trying to import R8_UNO

Re: [Mesa-dev] [PATCH] mesa/st: fix yuv EGLImage's

2017-05-17 Thread Philipp Zabel
On Tue, 2017-05-16 at 10:33 -0400, Rob Clark wrote: > Don't reject YUV formats that the driver doesn't handle natively, since > mesa/st already knows how to lower this in shader. > > Fixes: 83e9de2 ("st/mesa: EGLImageTarget* error handling") > Cc: 17.1 Signed-off-by: Rob Clark > --- > src/mesa/s

[Mesa-dev] [RFC v2] etnaviv: flush color cache and depth cache together before resolves

2017-06-23 Thread Philipp Zabel
hows through. Other attempts such as adding a pipeline stall before the color flush or a TS cache flush afterwards or flushing multiple times, with stalls before and after each flush, have shown no effect. Signed-off-by: Philipp Zabel --- Changes since v1: - Add a comment explaining why we flush c

Re: [Mesa-dev] [PATCH 03/11] renderonly/etnaviv: stop importing resource from renderonly

2017-06-26 Thread Philipp Zabel
On Fri, 2017-06-23 at 17:50 +0200, Lucas Stach wrote: > The current way of importing the resource from renderonly after allocation > is opaque and is taking away control from the driver, which it needs in > order to implement more advanced scenarios, than the simple linear > scanout with matching s

Re: [Mesa-dev] [PATCH 01/11] etnaviv: fill in layer_stride for imported resources

2017-06-26 Thread Philipp Zabel
padding size. > * The stride of the BO must be greater or equal to our padded Reviewed-by: Philipp Zabel regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 02/11] etnaviv: fix memory leak when BO allocation fails

2017-06-26 Thread Philipp Zabel
return NULL; > + goto free_rsc; > } > > rsc->bo = bo; > @@ -223,6 +223,10 @@ etna_resource_alloc(struct pipe_screen *pscreen, > unsigned layout, > } > > return &rsc->base; > + > +free_rsc: > + F

Re: [Mesa-dev] [PATCH 04/11] etnaviv: pad scanout buffer size to RS alignment

2017-06-26 Thread Philipp Zabel
at.width0, padX); > + scanout_templat.height0 = align(scanout_templat.height0, padY); > + > + rsc->scanout = renderonly_scanout_for_resource(&scanout_templat, > + screen->ro, &handle); >if (!rsc->scan

Re: [Mesa-dev] [PATCH 05/11] etnaviv: increment correct seqno for external resources

2017-06-26 Thread Philipp Zabel
ipe_resource *prsc) > { > struct etna_resource *res = etna_resource(prsc); > > - res->seqno++; > + if (res->external) > + etna_resource(res->external)->seqno++; > + else > + res->seqno++; > } > > static void Reviewed-by: Phi

Re: [Mesa-dev] [PATCH] etnaviv: only flush resource to self if no scanout buffer exists

2017-06-26 Thread Philipp Zabel
etna_copy_resource(pctx, rsc->scanout->prime, prsc, 0, 0); > + etna_resource(rsc->scanout->prime)->seqno = rsc->seqno; > + } > } else if (etna_resource_needs_flush(rsc)) { >etna_copy_resource(pctx, prsc, prsc, 0, 0); >rsc->flush_seqno

Re: [Mesa-dev] [PATCH 06/11] etnaviv: also update textures from external resources

2017-06-26 Thread Philipp Zabel
om->base, 0, > view->texture->last_level); > - etna_resource(res->texture)->seqno = res->seqno; > - } else if (etna_resource_needs_flush(res)) { > - etna_copy_resource(view->context, view->texture, view->texture, 0, 0); &

Re: [Mesa-dev] [PATCH 07/11] etnaviv: implement resource import with modifier

2017-06-27 Thread Philipp Zabel
ers too. */ > + if (rsc->layout == ETNA_LAYOUT_LINEAR) { > + /* > + * Both sampler and pixel pipes can't handle linear, create a > compatible > + * base resource, where we can attach the imported buffer as an > external > + * resource. > + */ > + struct pipe_resource tiled_templat = *tmpl; > + > + /* > + * Remove BIND_SCANOUT to avoid recursion, as etna_resource_create uses > + * this function to import the scanout buffer and get a tiled resource. > + */ > + tiled_templat.bind &= ~PIPE_BIND_SCANOUT; > > - ptiled = etna_resource_create(pscreen, tmpl); > + ptiled = etna_resource_create(pscreen, &tiled_templat); >if (!ptiled) > goto fail; > Reviewed-by: Philipp Zabel regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] etnaviv: flush source TS before resolve

2017-06-28 Thread Philipp Zabel
te(ctx->stream, VIVS_TS_FLUSH_CACHE, > VIVS_TS_FLUSH_CACHE_FLUSH); > } > > /* Set up color TS to source surface before blit, if needed */ Reviewed-by: Philipp Zabel regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] st/mesa: release EGLImage on EGLImageTarget* error

2017-06-30 Thread Philipp Zabel
rror path if !is_format_supported(). Fixes: 83e9de25f325 ("st/mesa: EGLImageTarget* error handling") Signed-off-by: Philipp Zabel --- src/mesa/state_tracker/st_cb_eglimage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/

Re: [Mesa-dev] [PATCH v2 1/2] etnaviv: fix varying interpolation

2017-09-19 Thread Philipp Zabel
shader_link_info *info, >    varying = &info->varyings[fsio->reg - 1]; >    varying->num_components = fsio->num_components; >   > -  if (fsio->semantic.Name == TGSI_SEMANTIC_COLOR) /* colors affected by > flat shading */ > +  if (interpolate) /* colors

[Mesa-dev] [PATCH v5 0/7] etnaviv: update derived texture resources of (re)imported buffers

2017-01-19 Thread Philipp Zabel
e the resource_changed wrapper only if resource_changed is implemented by the wrapped pipe_screen, add SCR_INIT macros to the rbug and trace wrappers. - Fix rbug_screen_resource_changed return value. Philipp Zabel (7): gallium: add pipe_screen::resource_changed st/dri: ask the driver to u

[Mesa-dev] [PATCH v5 1/7] gallium: add pipe_screen::resource_changed

2017-01-19 Thread Philipp Zabel
Add a hook to tell drivers that an imported resource may have changed and they need to update their internal derived resources. Signed-off-by: Philipp Zabel Reviewed-by: Roland Scheidegger --- src/gallium/docs/source/screen.rst | 14 ++ src/gallium/include/pipe/p_screen.h | 8

[Mesa-dev] [PATCH v5 4/7] etnaviv: implement resource_changed to invalidate internal resources derived from imported buffers

2017-01-19 Thread Philipp Zabel
Implement the resource_changed pipe callback to invalidate internal resources derived from imported buffers. This is needed to update the texture for re-imported renderables. Signed-off-by: Philipp Zabel Reviewed-by: Reviewed-by: Christian Gmeiner --- src/gallium/drivers/etnaviv

[Mesa-dev] [PATCH v5 7/7] gallium: add pipe_screen::resource_changed callback wrappers

2017-01-19 Thread Philipp Zabel
Add resource_changed to the ddebug, rbug, and trace wrappers. Since it is optional, there is no need to add it to noop. Signed-off-by: Philipp Zabel Suggested-by: Nicolai Hähnle --- Changes since v4: - Use SCR_INIT to initialize the resource_changed wrapper only if resource_changed is

[Mesa-dev] [PATCH v5 2/7] st/dri: ask the driver to update its internal copies on reimport

2017-01-19 Thread Philipp Zabel
eated. Signed-off-by: Philipp Zabel --- src/gallium/state_trackers/dri/dri2.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 77523e9..c4f2c57 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/ga

[Mesa-dev] [PATCH v5 3/7] etnaviv: initialize seqno of imported resources

2017-01-19 Thread Philipp Zabel
Imported resources already have contents that we want to be copied to texture resources derived from them. Set initial seqno of imported resources to 1, just as if it had already been rendered to. Signed-off-by: Philipp Zabel Reviewed-by: Christian Gmeiner --- src/gallium/drivers/etnaviv

[Mesa-dev] [PATCH v5 5/7] mesa: update external textures when (re-)binding

2017-01-19 Thread Philipp Zabel
mesa_BindTextures if the target is external. This will later allow the state tracker to instruct the pipe driver to invalidate internal resources derived from the external texture. Signed-off-by: Philipp Zabel --- src/mesa/main/texobj.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[Mesa-dev] [PATCH v5 6/7] st/mesa: ask pipe driver to recreate derived internal resources when (re-)binding external textures

2017-01-19 Thread Philipp Zabel
values that correspond to the values in the external texture at or after the time that glBindTexture was called. Signed-off-by: Philipp Zabel --- src/mesa/state_tracker/st_atom_texture.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa

[Mesa-dev] [PATCH 1/2] st/mesa: move st_manager_get_egl_image_surface into st_cb_eglimage.c

2017-03-27 Thread Philipp Zabel
The only callers are here, and we will add generation of GL errors in the following patch. Rename the function to st_egl_image_get_surface, pass the gl_context instead of st_context, and move the cast from GLeglImageOES to void* into st_egl_image_get_surface. Signed-off-by: Philipp Zabel

[Mesa-dev] [PATCH 2/2] st/mesa: EGLImageTarget* error handling

2017-03-27 Thread Philipp Zabel
ALID_VALUE error is generated. Signed-off-by: Philipp Zabel --- src/mesa/state_tracker/st_cb_eglimage.c | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c index e1fc9bff75..

[Mesa-dev] [PATCH v2 2/2] st/mesa: EGLImageTarget* error handling

2017-03-29 Thread Philipp Zabel
ALID_VALUE error is generated. Signed-off-by: Philipp Zabel Reviewed-by: Nicolai Hähnle --- v2: fixed get_surface to actually use the usage and error parameters --- src/mesa/state_tracker/st_cb_eglimage.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git

[Mesa-dev] [PATCH v2 1/2] st/mesa: move st_manager_get_egl_image_surface into st_cb_eglimage.c

2017-03-29 Thread Philipp Zabel
The only callers are here, and we will add generation of GL errors in the following patch. Rename the function to st_egl_image_get_surface, pass the gl_context instead of st_context, and move the cast from GLeglImageOES to void* into st_egl_image_get_surface. Signed-off-by: Philipp Zabel

Re: [Mesa-dev] [PATCH v2 2/2] st/mesa: EGLImageTarget* error handling

2017-03-29 Thread Philipp Zabel
On Wed, 2017-03-29 at 13:01 +0200, Nicolai Hähnle wrote: > On 29.03.2017 09:44, Philipp Zabel wrote: > > Stop trying to specify texture or renderbuffer objects for unsupported > > EGL images. Generate the error codes specified in the OES_EGL_image > > extension. > > >

[Mesa-dev] [RFC] etnaviv: native fence fd support

2017-04-05 Thread Philipp Zabel
This adds native fence fd support to etnaviv, similarly to commit 0b98e84e9ba0 ("freedreno: native fence fd"), enabled for kernel driver version 1.1 or later. Signed-off-by: Philipp Zabel --- This depends on libdrm patches [1][2] which may or may not make their way into libdrm 2.4.78.

Re: [Mesa-dev] [RFC] etnaviv: native fence fd support

2017-04-06 Thread Philipp Zabel
On Wed, 2017-04-05 at 13:12 -0400, Rob Clark wrote: > On Wed, Apr 5, 2017 at 12:14 PM, Philipp Zabel wrote: > > +void > > +etna_fence_server_sync(struct pipe_context *pctx, > > + struct pipe_fence_handle *pfence) > > +{ > > + struct etna

  1   2   >