gfxstream + Mesa: the deal of the century?

2024-01-24 Thread Gurchetan Singh
tl;dr - Interested in porting the gfxstream virtualization solution to Mesa and wondering how everyone feels about it -- | Longer | -- Dear all, In an earnings call with investors, Santa Claus shared a grim outlook for the North Pole. The Q4 2023 holiday season's yield of

Re: [Mesa-dev] [PATCH] egl/android: Enable HAL_PIXEL_FORMAT_RGBA_FP16 format

2019-08-29 Thread Gurchetan Singh
Thanks for the patch and review, merged! On Thu, Aug 29, 2019 at 3:45 AM Tapani Pälli wrote: > > Reviewed-by: Tapani Pälli > > On 8/29/19 12:18 AM, Nataraj Deshpande wrote: > > The patch adds support for 64 bit HAL_PIXEL_FORMAT_RGBA_FP16 > > for android platform. > > > > Fixes

Re: [Mesa-dev] [PATCH] virgl: close drm fd when destroying virgl screen.

2019-04-02 Thread Gurchetan Singh
On Mon, Apr 1, 2019 at 12:39 PM Lepton Wu wrote: > > On Wed, Mar 20, 2019 at 2:26 PM Chia-I Wu wrote: > >> Reviewed-by: Chia-I Wu >> > Anything else to need for merging this? I think this is a straightforward > leaking fix. > Merged. Thanks for the patch and review! > > >> >> On Mon, Mar

Re: [Mesa-dev] [PATCH] gallium/util: Fix off-by-one in box intersection

2019-03-01 Thread Gurchetan Singh
On Thu, Feb 28, 2019 at 8:15 PM Roland Scheidegger wrote: > > Am 01.03.19 um 00:28 schrieb Gurchetan Singh: > > On Thu, Feb 28, 2019 at 12:39 AM Boris Brezillon > > wrote: > >> > >> Hello Gurchetan, > >> > >> On Wed, 27 Feb 2019 10:34:26 -08

Re: [Mesa-dev] [PATCH] gallium/util: Fix off-by-one in box intersection

2019-02-28 Thread Gurchetan Singh
On Thu, Feb 28, 2019 at 12:39 AM Boris Brezillon wrote: > > Hello Gurchetan, > > On Wed, 27 Feb 2019 10:34:26 -0800 > Gurchetan Singh wrote: > > > On Mon, Feb 25, 2019 at 12:35 AM Boris Brezillon > > wrote: > > > > > > From: Daniel Stone >

Re: [Mesa-dev] [PATCH] gallium/util: Fix off-by-one in box intersection

2019-02-27 Thread Gurchetan Singh
On Mon, Feb 25, 2019 at 12:35 AM Boris Brezillon wrote: > > From: Daniel Stone > > pipe_boxes are x/y + width/height, rather than x0/y0 -> x1/y1. This > means that (x+width) is not included in the box. > > The box intersection check was seemingly written for inclusive regions, > and would

Re: [Mesa-dev] [PATCH 10/12] virgl: modify how we handle GL_MAP_FLUSH_EXPLICIT_BIT

2018-12-17 Thread Gurchetan Singh
On Tue, Dec 11, 2018 at 2:49 PM Elie Tournier wrote: > On Mon, Dec 10, 2018 at 10:20:36AM -0800, Gurchetan Singh wrote: > > Previously, we ignored the the glUnmap(..) operation and > > flushed before we flush the cbuf. Now, let's just flush > > the data when we unmap. &

Re: [Mesa-dev] [PATCH] virgl: force linear texturing support

2018-12-10 Thread Gurchetan Singh
PIPE_CAP_RESOURCE_FROM_USER_MEMORY: > case PIPE_CAP_DEVICE_RESET_STATUS_QUERY: > - case PIPE_CAP_TEXTURE_FLOAT_LINEAR: > - case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR: > case PIPE_CAP_DEPTH_BOUNDS_TEST: > case PIPE_CAP_SHAREABLE_SHADERS: > case PIPE_CAP_CLEAR_TEXTURE: >

[Mesa-dev] [PATCH 10/12] virgl: modify how we handle GL_MAP_FLUSH_EXPLICIT_BIT

2018-12-10 Thread Gurchetan Singh
Previously, we ignored the the glUnmap(..) operation and flushed before we flush the cbuf. Now, let's just flush the data when we unmap. Neither method is optimal, for example: glMapBufferRange(.., 0, 100, GL_MAP_FLUSH_EXPLICIT_BIT) glFlushMappedBufferRange(.., 25, 30)

Re: [Mesa-dev] [PATCH 10/12] virgl: modify how we handle GL_MAP_FLUSH_EXPLICIT_BIT

2018-12-10 Thread Gurchetan Singh
On Mon, Dec 10, 2018 at 7:35 AM Elie Tournier wrote: > On Thu, Dec 06, 2018 at 05:20:42PM -0800, Gurchetan Singh wrote: > > Previously, we ignored the the glUnmap(..) operation and > > flushed before we flush the cbuf. Now, let's just flush > > the data when we unmap. &

[Mesa-dev] [PATCH 11/12] virgl: move resource metadata into base resource

2018-12-06 Thread Gurchetan Singh
A resource is just a buffer with some metadata. --- src/gallium/drivers/virgl/virgl_buffer.c | 51 +++-- src/gallium/drivers/virgl/virgl_context.c | 5 +- src/gallium/drivers/virgl/virgl_resource.h | 21 +- src/gallium/drivers/virgl/virgl_texture.c | 85 +++--- 4

[Mesa-dev] [PATCH 12/12] virgl: move resource creation / import / destruction to common code

2018-12-06 Thread Gurchetan Singh
We can remove some duplicated code. --- src/gallium/drivers/virgl/virgl_buffer.c | 33 + src/gallium/drivers/virgl/virgl_resource.c | 84 +++--- src/gallium/drivers/virgl/virgl_resource.h | 16 ++--- src/gallium/drivers/virgl/virgl_texture.c | 70 ++ 4

[Mesa-dev] [PATCH 10/12] virgl: modify how we handle GL_MAP_FLUSH_EXPLICIT_BIT

2018-12-06 Thread Gurchetan Singh
Previously, we ignored the the glUnmap(..) operation and flushed before we flush the cbuf. Now, let's just flush the data when we unmap. Neither method is optimal, for example: glMapBufferRange(.., 0, 100, GL_MAP_FLUSH_EXPLICIT_BIT) glFlushMappedBufferRange(.., 25, 30)

[Mesa-dev] [PATCH 09/12] virgl: make virgl_buffers use resource helpers

2018-12-06 Thread Gurchetan Singh
We reuse the helpers we created. --- src/gallium/drivers/virgl/virgl_buffer.c | 28 +++--- src/gallium/drivers/virgl/virgl_resource.h | 1 + 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/gallium/drivers/virgl/virgl_buffer.c

[Mesa-dev] [PATCH 05/12] virgl: move vrend_get_tex_image_offset to common code

2018-12-06 Thread Gurchetan Singh
Will be reused. --- src/gallium/drivers/virgl/virgl_resource.c | 24 +++ src/gallium/drivers/virgl/virgl_resource.h | 3 +++ src/gallium/drivers/virgl/virgl_texture.c | 27 +- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git

[Mesa-dev] [PATCH 07/12] virgl: consolidate transfer code

2018-12-06 Thread Gurchetan Singh
We could allocate and destroy transfers in one place. --- src/gallium/drivers/virgl/virgl_buffer.c | 2 +- src/gallium/drivers/virgl/virgl_resource.c | 47 +++--- src/gallium/drivers/virgl/virgl_resource.h | 14 -- src/gallium/drivers/virgl/virgl_texture.c | 58

[Mesa-dev] [PATCH 08/12] virgl: make transfer code with PIPE_BUFFER targets

2018-12-06 Thread Gurchetan Singh
util_format_get_blocksize returns 1 for R8 formats (all PIPE_BUFFERs are R8). --- src/gallium/drivers/virgl/virgl_resource.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/virgl/virgl_resource.c b/src/gallium/drivers/virgl/virgl_resource.c index

[Mesa-dev] [PATCH 06/12] virgl: store layer_stride in metadata

2018-12-06 Thread Gurchetan Singh
The ioctls don't even pass this (though they should). Let's calculate this correctly in one place and then pass it down. Note -- If anyone is using vtest with protocol version 1 (why?), then you'll need this host side CL too since the layer stride is forwarded for non-array textures.

[Mesa-dev] [PATCH 04/12] virgl: move virgl_resource_layout to common code

2018-12-06 Thread Gurchetan Singh
Will be reused. --- src/gallium/drivers/virgl/virgl_resource.c | 37 +++ src/gallium/drivers/virgl/virgl_resource.h | 4 ++ src/gallium/drivers/virgl/virgl_texture.c | 52 +- 3 files changed, 51 insertions(+), 42 deletions(-) diff --git

[Mesa-dev] [PATCH 01/12] virgl: texture_transfer_pool --> transfer_pool

2018-12-06 Thread Gurchetan Singh
It's used for all types of resources. --- src/gallium/drivers/virgl/virgl_buffer.c | 4 ++-- src/gallium/drivers/virgl/virgl_context.c | 4 ++-- src/gallium/drivers/virgl/virgl_context.h | 2 +- src/gallium/drivers/virgl/virgl_screen.c | 4 ++-- src/gallium/drivers/virgl/virgl_screen.h | 2 +-

[Mesa-dev] [PATCH 03/12] virgl: move texture metadata to common code

2018-12-06 Thread Gurchetan Singh
Will be reused. --- src/gallium/drivers/virgl/virgl_resource.h | 11 --- src/gallium/drivers/virgl/virgl_texture.c | 19 ++- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/gallium/drivers/virgl/virgl_resource.h

[Mesa-dev] [PATCH 02/12] virgl: remove unnessecary code

2018-12-06 Thread Gurchetan Singh
With commit 89b479, we moved to tracking buffer cleanliness when binding. TEST=dEQP-GLES31.functional.image_load_store.buffer.load_store.r32ui --- src/gallium/drivers/virgl/virgl_buffer.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gallium/drivers/virgl/virgl_buffer.c

Re: [Mesa-dev] [PATCH 0/7] EGLDevice, take 2.1

2018-12-03 Thread Gurchetan Singh
On Mon, Dec 3, 2018 at 8:06 AM Emil Velikov wrote: > Hi Gurchetan, > > On Thu, 29 Nov 2018 at 23:41, Gurchetan Singh > wrote: > > > > Does this require libdrm 2.4.95 for virtio-gpu? With > > platform_surfaceless, I keep getting "DRI2: failed to find EGLDevic

Re: [Mesa-dev] [PATCH 1/3] virgl: quadruple command buffer size

2018-11-29 Thread Gurchetan Singh
Thanks! Gentle ping for push from committers.. On Mon, Nov 26, 2018 at 11:52 AM Erik Faye-Lund wrote: > > On Mon, 2018-11-26 at 09:54 -0800, Gurchetan Singh wrote: > > Tested running WebGL aquarium on Nvidia host (10,000 fishes) > > > > This moves us from 7 fps to 9

Re: [Mesa-dev] [PATCH 0/7] EGLDevice, take 2.1

2018-11-29 Thread Gurchetan Singh
Does this require libdrm 2.4.95 for virtio-gpu? With platform_surfaceless, I keep getting "DRI2: failed to find EGLDevice" and the failure is happening in "drmGetDevice2(fd, 0, )".On Sat, Oct 20, 2018 at 11:46 PM Mathias Fröhlich wrote: > > Hi Emil, > > On Wednesday, 3 October 2018 16:02:40 CEST

[Mesa-dev] [PATCH] egl: add missing #include in egldevice.h

2018-11-28 Thread Gurchetan Singh
Otherwise, I get this error: main/egldevice.h:54:13: error: ‘NULL’ undeclared (first use in this function) dev = NULL; ^~~~ with this config: ./autogen.sh --enable-gles1 --enable-gles2 --with-platforms='surfaceless' --disable-glx --with-dri-drivers="i965"

[Mesa-dev] [PATCH] egl: define NULL in egldevice.h

2018-11-27 Thread Gurchetan Singh
Otherwise, I get this error: main/egldevice.h:54:13: error: ‘NULL’ undeclared (first use in this function) dev = NULL; ^~~~ with this config: ./autogen.sh --enable-gles1 --enable-gles2 --with-platforms='surfaceless' --disable-glx --with-dri-drivers="i965"

[Mesa-dev] [PATCH] egl: define NULL in egldevice.h

2018-11-27 Thread Gurchetan Singh
Otherwise, I get this error: main/egldevice.h:54:13: error: ‘NULL’ undeclared (first use in this function) dev = NULL; ^~~~ with this config: ./autogen.sh --enable-gles1 --enable-gles2 --with-platforms='surfaceless' --disable-glx --with-dri-drivers="i965"

[Mesa-dev] [PATCH] egl: define NULL in egldevice.h

2018-11-27 Thread Gurchetan Singh
Otherwise, I get this error: main/egldevice.h:54:13: error: ‘NULL’ undeclared (first use in this function) dev = NULL; ^~~~ with this config: ./autogen.sh --enable-gles1 --enable-gles2 --with-platforms='surfaceless' --disable-glx --with-dri-drivers="i965"

[Mesa-dev] [PATCH 2/3] virgl: avoid large inline transfers

2018-11-26 Thread Gurchetan Singh
We flush everytime the command buffer (16 kB) is full, which is quite costly. This improves dEQP-GLES3.performance.buffer.data_upload.function_call.buffer_data.new_buffer.usage_stream_draw from 111.16 MB/s to 1930.36 MB/s. In addition, I made the benchmark produce buffers from 0 -->

[Mesa-dev] [PATCH 3/3] virgl: don't mark buffers as unclean after a write

2018-11-26 Thread Gurchetan Singh
We can mark the buffer unclean if it's ever bound as a TBO, SSBO, ABO, or image. This improves dEQP-GLES3.performance.buffer.data_upload.function_call.map_buffer_range.new_specified_buffer.flag_write_full.stream_draw from 9.58 MB/s to 451.17 MB/s. v2: Track buffer cleanliness as a function of

[Mesa-dev] [PATCH 1/3] virgl: quadruple command buffer size

2018-11-26 Thread Gurchetan Singh
Tested running WebGL aquarium on Nvidia host (10,000 fishes) This moves us from 7 fps to 9 fps. After quadrupling, performance gains diminish. v2: Remove change ID (Erik) Tested-By: Gert Wollny --- src/gallium/drivers/virgl/virgl_winsys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Mesa-dev] [PATCH 2/2] virgl: don't mark buffers as unclean after a write

2018-11-21 Thread Gurchetan Singh
We can mark the buffer unclean if it's ever bound as a TBO, SSBO, ABO, or image. This improves dEQP-GLES3.performance.buffer.data_upload.function_call.map_buffer_range.new_specified_buffer.flag_write_full.stream_draw from 9.58 MB/s to 451.17 MB/s. v2: Using buffer bindings to track cleanliness

[Mesa-dev] [PATCH 1/2] virgl: avoid large inline transfers

2018-11-21 Thread Gurchetan Singh
We flush everytime the command buffer (16 kB) is full, which is quite costly. This improves dEQP-GLES3.performance.buffer.data_upload.function_call.buffer_data.new_buffer.usage_stream_draw from 111.16 MB/s to 1930.36 MB/s. In addition, I made the benchmark produce buffers from 0 -->

[Mesa-dev] [PATCH] virgl: quadruple command buffer size

2018-11-21 Thread Gurchetan Singh
Tested running WebGL aquarium on Nvidia host (10,000 fishes) This moves us from 7 fps to 9 fps. After quadrupling, performance gains diminish. Change-Id: Iba3a9929ba2d17cf5a38233b92391dd413b79bc2 --- src/gallium/drivers/virgl/virgl_winsys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [Mesa-dev] [PATCH] virgl: don't mark buffers as unclean after a write

2018-11-20 Thread Gurchetan Singh
-ilia > On Tue, Nov 20, 2018 at 6:11 PM Gurchetan Singh > wrote: > > > > Texture buffers and SSBOs are always unclean, while other buffers > > are not modified by compu

[Mesa-dev] [PATCH] virgl: don't mark buffers as unclean after a write

2018-11-20 Thread Gurchetan Singh
Texture buffers and SSBOs are always unclean, while other buffers are not modified by compute/rendering. This improves dEQP-GLES3.performance.buffer.data_upload.function_call.map_buffer_range.new_specified_buffer.flag_write_full.stream_draw from 9.58 MB/s to 451.17 MB/s. Regression tested

Re: [Mesa-dev] [PATCH v5 2/2] virgl: Pass resource size and transfer offsets

2018-10-05 Thread Gurchetan Singh
On Fri, Oct 5, 2018 at 1:04 AM Gert Wollny wrote: > > Am Donnerstag, den 04.10.2018, 10:48 -0700 schrieb Gurchetan Singh: > > > > The idea is to get rid of any adjustments on both the Mesa / > > virglrenderer sides -- so transfer size is just what's needed to &

Re: [Mesa-dev] [PATCH v5 2/2] virgl: Pass resource size and transfer offsets

2018-10-04 Thread Gurchetan Singh
On Thu, Oct 4, 2018 at 7:41 AM Gert Wollny wrote: > > From: Tomeu Vizoso > > Pass the size of a resource when creating it so a backing can be kept in > the other side. > > Also pass the required offset to transfer commands. > > This moves vtest closer to how virtio-gpu works, making it more

Re: [Mesa-dev] [PATCH v5 1/2] virgl, vtest: Correct the transfer size calculation

2018-10-04 Thread Gurchetan Singh
vtest_hdr[VTEST_CMD_LEN] += (data_size + 3) / 4; > > cmd[0] = handle; > cmd[1] = level; > -- > 2.16.4 > Reviewed-by: Gurchetan Singh ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] i965: fallback RGBX to RGBA in glEGLImageTargetRenderbufferStorageOES

2018-10-03 Thread Gurchetan Singh
Reviewed-by: Gurchetan Singh On Wed, Oct 3, 2018 at 2:53 AM Tapani Pälli wrote: > > From: "Chystiakov, Dmytro" > > In the same fashion as is done for glEGLImageTextureTarget2D. > > v2: share the fallback which sets baseformat and internalformat correctly > whi

Re: [Mesa-dev] [PATCH v4 2/2] virgl: Pass resource size and transfer offsets

2018-10-03 Thread Gurchetan Singh
On Tue, Oct 2, 2018 at 12:08 AM Gert Wollny wrote: > > From: Tomeu Vizoso > > Pass the size of a resource when creating it so a backing can be kept in > the other side. > > Also pass the required offset to transfer commands. > > This moves vtest closer to how virtio-gpu works, making it more

Re: [Mesa-dev] [PATCH 1/2] virgl: Negotiate version with vtest server

2018-09-14 Thread Gurchetan Singh
Reviewed-by: Gurchetan Singh Was there a second patch sent out? On Thu, Sep 13, 2018 at 4:24 AM Gert Wollny wrote: > > From: Tomeu Vizoso > > Check if server supports version negotation by sending a PING_PROTOCOL_VERSION > message right before a dummy RESOURCE_BUSY_WAIT.

Re: [Mesa-dev] [PATCH v2 0/7] gallium/virgl: use hw-atomic buffers

2018-09-04 Thread Gurchetan Singh
Series is: Reviewed-by: Gurchetan Singh On Tue, Sep 4, 2018 at 2:09 AM Erik Faye-Lund wrote: > > OK, so here's a respin of this series, with the following changes: > > - [Gurchetan] Use PIPE_MAX_SHADER_BUFFERS instead of > PIPE_MAX_HW_ATOMIC_BUFFERS. > - [Gurchetan] Fi

Re: [Mesa-dev] [PATCH 5/7] gallium: add PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTER{S, _BUFFERS}

2018-08-31 Thread Gurchetan Singh
On Thu, Aug 30, 2018 at 6:41 AM Erik Faye-Lund wrote: > > This moves the evergreen-specific max-sizes out as a driver-cap, so > other drivers with less strict requirements also can use hw-atomics. > > Remove ssbo_atomic as it's no longer needed. > > We should now be able to use hw-atomics for

Re: [Mesa-dev] [PATCH 7/7] virgl: use hw-atomics instead of in-ssbo ones

2018-08-31 Thread Gurchetan Singh
On Thu, Aug 30, 2018 at 6:41 AM Erik Faye-Lund wrote: > > From: Tomeu Vizoso > > Emulating atomics on top of ssbos can lead to too small max SSBO count, > so let's use the hw-atomics mechanism to expose atomic buffers instead. > > Signed-off-by: Erik Faye-Lund > --- >

[Mesa-dev] [PATCH 1/2] meson: fix egl build for surfaceless

2018-08-22 Thread Gurchetan Singh
Without this, I get: > platform_surfaceless.c:38:10: fatal error: 'loader.h' file not found > #include "loader.h" > ^~ > 1 error generated. Fixes: 108d257a16859898f5ce02f4759c5c58f9b8c050 ("meson: build libEGL") v2: Split up patches, modify commit message (Dylan) ---

[Mesa-dev] [PATCH 2/2] meson: fix egl build for android

2018-08-22 Thread Gurchetan Singh
Haven't tested this, but we do include loader.h in platform_android.c Fixes: c5ec1556859b7d33637c9fad13d3473c7b2f9eb3 ("meson: wire up egl/android") --- src/egl/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/src/egl/meson.build b/src/egl/meson.build index 9c0b6b4b4a..06922c6c3c

[Mesa-dev] [PATCH] meson: fix egl build for surfaceless and android

2018-08-22 Thread Gurchetan Singh
Without this, I get: > platform_surfaceless.c:38:10: fatal error: 'loader.h' file not found > #include "loader.h" > ^~ > 1 error generated. I also included this for platform_android, but I haven't tested that case. --- src/egl/meson.build | 2 ++ 1 file changed, 2 insertions(+)

Re: [Mesa-dev] [PATCH] virgl: bump 3D texture limit to 2048, as GL4.1 requires

2018-08-14 Thread Gurchetan Singh
On Tue, Aug 14, 2018 at 2:59 AM Erik Faye-Lund wrote: > > > > On Tue, Aug 14, 2018 at 5:47 AM, Gurchetan Singh > wrote: > > This is virgl analogue to cf6dad. Fixes: > dEQP-GLES31.functional.image_load_store.3d.atomic.* Example test cases: > dEQP-GLES31.

[Mesa-dev] [PATCH] virgl: bump 3D texture limit to 2048, as GL4.1 requires

2018-08-13 Thread Gurchetan Singh
This is virgl analogue to cf6dad. Fixes: dEQP-GLES31.functional.image_load_store.3d.atomic.* Example test cases: dEQP-GLES31.functional.image_load_store.3d.atomic.add_r32ui_return_value dEQP-GLES31.functional.image_load_store.3d.atomic.min_r32ui_return_value

Re: [Mesa-dev] [PATCH 1/3] virgl: add initial ARB_compute_shader support

2018-07-31 Thread Gurchetan Singh
This series is: Reviewed-by: Gurchetan Singh On Tue, Jul 31, 2018 at 3:29 PM Dave Airlie wrote: > > From: Dave Airlie > > This hooks up compute shader creation and launch grid support. > --- > src/gallium/drivers/virgl/virgl_context.c | 55 ++-- >

Re: [Mesa-dev] [PATCH] gallium/auxiliary: Fix Autotools on Android (v2)

2018-07-24 Thread Gurchetan Singh
Reviewed-by: Gurchetan Singh On Tue, Jul 24, 2018 at 6:11 PM Chad Versace wrote: > > Problem 1: u_debug_stack_android.cpp transitively included > "pipe/p_compiler.h", but src/gallium/include was missing from the C++ > include path. > > Problem 2: Add -std=c++

Re: [Mesa-dev] [PATCH] virgl: Allow RGB32* textures only as buffer objects

2018-07-20 Thread Gurchetan Singh
format == PIPE_FORMAT_R32G32B32_SINT || > + format == PIPE_FORMAT_R32G32B32_UINT) && > + target != PIPE_BUFFER) > + return FALSE; > + > if (bind & PIPE_BIND_RENDER_TARGET) { >if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) >

Re: [Mesa-dev] [PATCH] virgl: Expose GL_ARB_copy_image if host supports it

2018-07-20 Thread Gurchetan Singh
Reviewed-by: Gurchetan Singh On Tue, Jul 3, 2018 at 4:32 AM Gert Wollny wrote: > > Signed-off-by: Gert Wollny > --- > Note that I used (1 << 3) instead of (1 << 2) because Dave's experimental > patch > already uses the latter for computer shader caps.

Re: [Mesa-dev] [PATCH] virgl: remove unused stride-arguments

2018-07-19 Thread Gurchetan Singh
Reviewed-by: Gurchetan Singh On Wed, Jul 18, 2018 at 4:06 AM Erik Faye-Lund wrote: > > The IOCTLs doesn't pass this along, so computing them in the first > place is kinda pointless. > > Signed-off-by: Erik Faye-Lund > --- > > This is just a cleanup I noticed based on s

[Mesa-dev] [PATCH] tgsi: add some atomic opcodes to tgsi_opcode_infer_type

2018-06-14 Thread Gurchetan Singh
We don't have cases for atomic types, some of which are explicitly signed or unsigned. The other opcodes could have uint or int return types, based on the sources. --- src/gallium/auxiliary/tgsi/tgsi_info.c | 5 + 1 file changed, 5 insertions(+) diff --git

Re: [Mesa-dev] [PATCH] virgl: enable ARB_gpu_shader_fp64

2018-06-08 Thread Gurchetan Singh
Tested-by: Gurchetan Singh Reviewed-by: Gurchetan Singh On Thu, Jun 7, 2018 at 7:24 PM Dave Airlie wrote: > > From: Dave Airlie > > This enables ARB_gpu_shader_fp64 if the host provides it. > --- > src/gallium/drivers/virgl/virgl_screen.c | 3 ++- > 1 file changed, 2 inse

Re: [Mesa-dev] [PATCH] features: add virgl to the GL features list

2018-06-07 Thread Gurchetan Singh
Reviewed-by: Gurchetan Singh On Wed, Jun 6, 2018 at 5:45 PM Dave Airlie wrote: > > From: Dave Airlie > > This hopefully adds virgl to the correct places and current statuses > of various extensions. > > virgl of course relies on two external things > a) host driver that

Re: [Mesa-dev] [PATCH] virgl: enable ARB_gpu_shader_fp64

2018-06-05 Thread Gurchetan Singh
Tested-by: Gurchetan Singh Reviewed-by: Gurchetan Singh On Mon, Jun 4, 2018 at 9:32 PM Dave Airlie wrote: > > From: Dave Airlie > > This enables ARB_gpu_shader_fp64 if the host provides it. > --- > src/gallium/drivers/virgl/virgl_screen.c | 3 ++- > 1 file changed, 2 inse

Re: [Mesa-dev] [PATCH] virgl: add shader offset alignment to to v2 caps struct

2018-06-04 Thread Gurchetan Singh
I sent out a patch that adds capability bits to this struct, and the first bit is the tgsi invariant capability. It's dependent on this patch to apply correctly to master. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

Re: [Mesa-dev] [PATCH] virgl: add shader offset alignment to to v2 caps struct

2018-06-04 Thread Gurchetan Singh
Got it, thanks. Let me send a patch to virglrenderer to change tgsi_invariant to some sort of bitset, since when it lands it'll just need one bit. On Mon, Jun 4, 2018 at 9:39 AM Gert Wollny wrote: > > Am Montag, den 04.06.2018, 09:07 -0700 schrieb Gurchetan Singh: > > The tgsi_in

Re: [Mesa-dev] [PATCH] virgl: add shader offset alignment to to v2 caps struct

2018-06-04 Thread Gurchetan Singh
The tgsi_invariant code never landed in the Mesa side. Is the caps code is resilient enough to handle this case? From my understanding the guest caps and host caps don't have to match exactly, and the "right thing" will be done. On Mon, Jun 4, 2018 at 6:03 AM Gert Wollny wrote: > > Am

Re: [Mesa-dev] [PATCH v3] mesa: handle a bunch of formats in IMPLEMENTATION_COLOR_READ_*

2018-05-24 Thread Gurchetan Singh
Reviewed-by: Gurchetan Singh <gurchetansi...@chromium.org> On Wed, May 23, 2018 at 1:36 AM Tomeu Vizoso <tomeu.viz...@collabora.com> wrote: > Virgl could save a lot of work converting buffers in the host side > between formats if Mesa supported a bunch of other formats whe

Re: [Mesa-dev] [RFC PATCH] virgl: Always assume that ORIGIN_UPPER_LEFT and PIXEL_CENTER* are supported

2018-05-22 Thread Gurchetan Singh
Reviewed-by: Gurchetan Singh <gurchetansi...@chromium.org> On Mon, May 21, 2018 at 12:37 AM Gert Wollny <gert.wol...@collabora.com> wrote: > Am Donnerstag, den 17.05.2018, 12:33 +0200 schrieb Gert Wollny: > > The driver must

Re: [Mesa-dev] [virglrenderer-devel] [PATCH] virgl: set texture buffer offset alignment to disable ARB_texture_buffer_range.

2018-05-18 Thread Gurchetan Singh
Reviewed-by: Gurchetan Singh <gurchetansi...@chromium.org> On Fri, May 18, 2018 at 6:01 AM Elie Tournier <tournier.e...@gmail.com> wrote: > Wrong ML. I add <mesa-dev@lists.freedesktop.org> > > On Fri, May 18, 2018 at 10:46:29AM +1000, Dave Airlie wrote: > > From

Re: [Mesa-dev] [PATCH] virgl: Update virgl_hw.h

2018-05-16 Thread Gurchetan Singh
Yes, it seems needed for the GLES on GLES work. Still needs to land: Reviewed-by: Gurchetan Singh <gurchetansi...@chromium.org> On Wed, May 9, 2018 at 7:15 PM Dave Airlie <airl...@gmail.com> wrote: > On 4 April 2018 at 02:06, Jakob Bornecrantz <ja...@collabora.com>

Re: [Mesa-dev] [PATCH] virgl: clear render state before submitting clear command

2018-05-07 Thread Gurchetan Singh
In vrend_clear, we already save and restore colormasks and stencils: https://cgit.freedesktop.org/virglrenderer/commit/?id=b75e0a1dabdfbda44c310a69026a9dbd7d980294 https://cgit.freedesktop.org/virglrenderer/commit/?id=252b00d77c30ce39608c1a9de18523cbdcaca623 It would be nice if we can put

Re: [Mesa-dev] [RFC PATCH] mesa/st/cb_clear: in st_Clear also validate the render state (needed by virgl)

2018-05-04 Thread Gurchetan Singh
On Fri, May 4, 2018 at 1:11 PM, Ilia Mirkin wrote: > On Fri, May 4, 2018 at 2:50 PM, Gert Wollny wrote: >> For that reason I think that a render state validation within st_Clear >> makes sense, because it makes sure that the states like

Re: [Mesa-dev] [PATCH] mesa/main/readpix: Correct handling of packed floating point values

2018-05-03 Thread Gurchetan Singh
on the host when reading back GL_R11F_G11F_B10F and probably converts to GL_FLOAT on the guest. I guess nobody, even conformance suites, wanted to deal with GL_UNSIGNED_INT_10F_11F_11F_REV ... Reviewed-by: Gurchetan Singh <gurchetansi...@chromium.org> (don't have commit access so hop

Re: [Mesa-dev] [PATCH 02/10] dri_interface: add __DRI_IMAGE_TRANSFER_USER_STRIDE

2018-04-30 Thread Gurchetan Singh
On Mon, Apr 30, 2018 at 2:38 PM, Marek Olšák wrote: > On Mon, Apr 30, 2018 at 3:11 PM, Eric Anholt wrote: >> >> Marek Olšák writes: >> >> > From: Nicolai Hähnle >> > >> > Allow the caller to specify the row stride

Re: [Mesa-dev] [PATCH 02/10] dri_interface: add __DRI_IMAGE_TRANSFER_USER_STRIDE

2018-04-27 Thread Gurchetan Singh
On Fri, Apr 27, 2018 at 2:00 AM, Nicolai Hähnle <nhaeh...@gmail.com> wrote: > On 26.04.2018 04:30, Marek Olšák wrote: >> >> On Wed, Apr 25, 2018 at 6:56 PM, Gurchetan Singh >> <gurchetansi...@chromium.org <mailto:gurchetansi...@chromium.org>> wrote: >>

Re: [Mesa-dev] [PATCH 02/10] dri_interface: add __DRI_IMAGE_TRANSFER_USER_STRIDE

2018-04-26 Thread Gurchetan Singh
On Thu, Apr 26, 2018 at 3:08 PM, Marek Olšák <mar...@gmail.com> wrote: > On Thu, Apr 26, 2018 at 2:40 PM, Gurchetan Singh > <gurchetansi...@chromium.org> wrote: >> >> On Thu, Apr 26, 2018 at 10:23 AM, Marek Olšák <mar...@gmail.com> wrote: >> > Gurche

Re: [Mesa-dev] [PATCH 02/10] dri_interface: add __DRI_IMAGE_TRANSFER_USER_STRIDE

2018-04-26 Thread Gurchetan Singh
:23 PM, Marek Olšák <mar...@gmail.com> wrote: >> >> Why would you want to modify it? It's exactly what you get when you map >> it, but that stride can't be used for modesetting. >> >> Marek >> >> >> On Wed, Apr 25, 2018 at 11:14 PM, Gurchetan Singh &

Re: [Mesa-dev] [PATCH 02/10] dri_interface: add __DRI_IMAGE_TRANSFER_USER_STRIDE

2018-04-25 Thread Gurchetan Singh
That sounds fine to me. We can just modify the stride after dri_bo_create(..). On Wed, Apr 25, 2018 at 7:30 PM, Marek Olšák <mar...@gmail.com> wrote: > On Wed, Apr 25, 2018 at 6:56 PM, Gurchetan Singh > <gurchetansi...@chromium.org> wrote: >> >> On Wed, Apr 25, 201

Re: [Mesa-dev] [PATCH 02/10] dri_interface: add __DRI_IMAGE_TRANSFER_USER_STRIDE

2018-04-25 Thread Gurchetan Singh
On Wed, Apr 25, 2018 at 2:16 PM, Marek Olšák wrote: > From: Nicolai Hähnle > > Allow the caller to specify the row stride (in bytes) with which an image > should be mapped. Note that completely ignoring USER_STRIDE is a valid > implementation of

[Mesa-dev] [PATCH] virgl: add shader offset alignment to to v2 caps struct

2018-04-12 Thread Gurchetan Singh
From: "gurchetansi...@chromium.org" This is the SSBO analogue to fe0647. User supplied data must be a multiple of GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT. This fixes 44 GLES31 tests on airlied@'s GLES31 sketch branches with Nvidia hardware, but this patch

[Mesa-dev] [PATCH] virgl: add offset alignment values to to v2 caps struct

2018-02-22 Thread Gurchetan Singh
From: "gurchetansi...@chromium.org" glBindBufferRange(..) in vrend_draw_bind_ubo is failing with more than one uniform block. This is due to improper alignment of the start of the second block. Let's query the proper alignment from the driver and pass it back to

Re: [Mesa-dev] [PATCH] virgl: remap query types to hw support.

2018-02-15 Thread Gurchetan Singh
PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE there makes sense for now. Reviewed-by: Gurchetan Singh <gurchetansi...@chromium.org> Tested-by: Gurchetan Singh <gurchetansi...@chromium.org> On Tue, Feb 13, 2018 at 6:58 PM, Dave Airlie <airl...@gmail.com> wrote: > From: Dave Airli

Re: [Mesa-dev] [PATCH] mesa: don't clamp just based on ARB_viewport_array extension

2018-02-14 Thread Gurchetan Singh
On Wed, Feb 14, 2018 at 3:57 PM, Marek Olšák <mar...@gmail.com> wrote: > Do you have commit access? No, would appreciate a merge ;-) > Marek > > On Thu, Feb 15, 2018 at 12:40 AM, gurchetansi...@chromium.org > <gurchetansi...@chromium.org> wrote: >> F

Re: [Mesa-dev] [PATCH] st/mesa: update the blend before a full color clear

2018-02-08 Thread Gurchetan Singh
On Thu, Feb 8, 2018 at 6:01 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Thu, Feb 8, 2018 at 8:58 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: >> On Thu, Feb 8, 2018 at 8:36 PM, Gurchetan Singh >> <gurchetansi...@chromium.org> wrote: >>> On Thu

Re: [Mesa-dev] [PATCH] st/mesa: update the blend before a full color clear

2018-02-08 Thread Gurchetan Singh
On Thu, Feb 8, 2018 at 5:15 PM, Marek Olšák <mar...@gmail.com> wrote: > > On Fri, Feb 9, 2018 at 2:12 AM, Gurchetan Singh > <gurchetansi...@chromium.org> wrote: > > On Thu, Feb 8, 2018 at 4:46 PM, Marek Olšák <mar...@gmail.com> wrote: >

Re: [Mesa-dev] [PATCH] st/mesa: update the blend before a full color clear

2018-02-08 Thread Gurchetan Singh
> Marek > > On Fri, Feb 9, 2018 at 1:28 AM, gurchetansi...@chromium.org > <gurchetansi...@chromium.org> wrote: > > From: Gurchetan Singh <gurchetansi...@chromium.org> > > > > Consider this series of events: > > > > glColorMask(G

Re: [Mesa-dev] [PATCH] virgl: also remove dimension on indirect.

2018-01-30 Thread Gurchetan Singh
Any plans to merge this? This fixes Chrome not starting with Virgl. Reviewed-by: Gurchetan Singh <gurchetansi...@chromium.org> Tested-by: Gurchetan Singh <gurchetansi...@chromium.org> On Mon, Nov 13, 2017 at 12:53 PM, Dave Airlie <airl...@gmail.com> wrote: > Fr

Re: [Mesa-dev] [RFC libdrm 0/5] Move alloc_handle_t from gralloc impls.

2018-01-12 Thread Gurchetan Singh
@kernel.org> wrote: > On Fri, Jan 12, 2018 at 2:29 AM, Tomasz Figa <tf...@chromium.org> wrote: > > Hi Rob, > > > > On Fri, Jan 12, 2018 at 5:26 AM, Robert Foss <robert.f...@collabora.com> > wrote: > >> Heya, > >> > >> > >> On 12/22

Re: [Mesa-dev] [RFC libdrm 0/5] Move alloc_handle_t from gralloc impls.

2018-01-12 Thread Gurchetan Singh
gt; >> On Fri, Jan 12, 2018 at 5:26 AM, Robert Foss <robert.f...@collabora.com> >> wrote: >> >>> Heya, >>> >>> >>> On 12/22/17 1:09 PM, Tomasz Figa wrote: >>> >>>> >>>> On Fri, Dec 22, 2017 at 10:09 AM, Gurch

Re: [Mesa-dev] [RFC libdrm 0/5] Move alloc_handle_t from gralloc impls.

2018-01-11 Thread Gurchetan Singh
om> wrote: > Heya, > > > On 12/22/17 1:09 PM, Tomasz Figa wrote: > >> On Fri, Dec 22, 2017 at 10:09 AM, Gurchetan Singh >> <gurchetansi...@chromium.org> wrote: >> >>> So the plan is for alloc_handle_t to not be sub-classed by the >>> implementa

Re: [Mesa-dev] [RFC libdrm 0/5] Move alloc_handle_t from gralloc impls.

2017-12-21 Thread Gurchetan Singh
the handle would add complexity to our (*registerBuffer) path. On Thu, Dec 21, 2017 at 10:14 AM, Rob Herring <r...@kernel.org> wrote: > On Wed, Dec 13, 2017 at 5:02 PM, Gurchetan Singh > <gurchetansi...@chromium.org> wrote: > > Hi Robert, > > > > Thanks for looking into

Re: [Mesa-dev] [RFC libdrm 0/5] Move alloc_handle_t from gralloc impls.

2017-12-13 Thread Gurchetan Singh
Hi Robert, Thanks for looking into this! We need to decide if we want: (1) A common struct that implementations can subclass, i.e: struct blah_gralloc_handle { alloc_handle_t alloc_handle; int x, y, z; } (2) An accessor library that vendors can implement, i.e: struct

Re: [Mesa-dev] [PATCH] egl: add dri2_surface_free_image() helper (v4)

2017-11-20 Thread Gurchetan Singh
Reviewed-by: Gurchetan Singh <gurchetansi...@chromium.org> On Wed, Nov 15, 2017 at 7:27 AM, Gwan-gyeong Mun <elong...@gmail.com> wrote: > To share common free DRIimage code. > > In preparation to adding of new platform which uses this helper. > > v2: > - Fixes fro

Re: [Mesa-dev] [PATCH v3 01/10] egl: add dri2_surface_fixup() helper (v3)

2017-11-06 Thread Gurchetan Singh
This patch series was intended to: a) de-duplicate code across various platforms. b) do preparatory work for platform_tizen. There was some confusion[1] on how we want to move forward with platform_tizen. Until we can figure that out, I suggest we drop patches that move stuff out of

Re: [Mesa-dev] [PATCH v3 07/10] egl: add dri2_surface_destroy_back_image() helper (v3)

2017-10-25 Thread Gurchetan Singh
No plans to merge dri2_surface_destroy_back_image and dri2_surface_destroy_front_image ;-)? Otherwise, looks consistent with the previous review comments. Patches 1-6 are: Reviewed-by: Gurchetan Singh <gurchetansi...@chromium.org> On Tue, Oct 24, 2017 at 2:45 PM, Gwan-gyeong Mun

Re: [Mesa-dev] [PATCH v2 6/8] egl: add dri2_egl_surface_destroy_image_front() helper (v2)

2017-10-24 Thread Gurchetan Singh
> > 2017-10-18 6:02 GMT+09:00 Gurchetan Singh <gurchetansi...@chromium.org>: > > dri2_egl_surface_destroy_image_front and dri2_egl_surface_destroy_ > image_back > > are almost identical. Why don't you just create a > > dri2_surface_free_image(struct dri2_eg

Re: [Mesa-dev] [PATCH v2 1/8] egl: add dri2_egl_surface_free_outdated_buffers_and_update_size() helper (v2)

2017-10-24 Thread Gurchetan Singh
> > Thank you for reviewing the patches. > > 2017-10-20 6:18 GMT+09:00 Gurchetan Singh <gurchetansi...@chromium.org>: > > De-duplicating and then trimming down works for me. > > > > On Thu, Oct 19, 2017 at 3:31 AM, Emil Velikov <emil.l.veli...@gmail.com&g

Re: [Mesa-dev] [PATCH v2 1/8] egl: add dri2_egl_surface_free_outdated_buffers_and_update_size() helper (v2)

2017-10-19 Thread Gurchetan Singh
De-duplicating and then trimming down works for me. On Thu, Oct 19, 2017 at 3:31 AM, Emil Velikov <emil.l.veli...@gmail.com> wrote: > On 18 October 2017 at 23:36, Gurchetan Singh > <gurchetansi...@chromium.org> wrote: > >> Then again, I'd suggest keeping that as sep

Re: [Mesa-dev] [PATCH v2 4/8] egl: add dri2_egl_surface_update_buffer_age() helper (v2)

2017-10-18 Thread Gurchetan Singh
The comment "we don't use get_back_bo() since ..." only makes sense in context on droid_swap_buffers. Why aren't you calling this helper in dri2_drm_swap_buffers and dri2_wl_swap_buffers_with_damage? It seems like you can. On Tue, Oct 17, 2017 at 7:38 AM, Emil Velikov

Re: [Mesa-dev] [PATCH mesa] egl: set UseFallback if LIBGL_ALWAYS_SOFTWARE is set

2017-10-18 Thread Gurchetan Singh
Reviewed-by: Gurchetan Singh <gurchetansi...@chromium.org> On Wed, Oct 18, 2017 at 9:09 AM, Eric Engestrom <eric.engest...@imgtec.com> wrote: > Suggested-by: Emil Velikov <emil.l.veli...@gmail.com> > Signed-off-by: Eric Engestrom <eric.engest...@imgtec.com>

Re: [Mesa-dev] [PATCH v2 1/8] egl: add dri2_egl_surface_free_outdated_buffers_and_update_size() helper (v2)

2017-10-18 Thread Gurchetan Singh
f WDYT? On Wed, Oct 18, 2017 at 2:55 AM, Emil Velikov <emil.l.veli...@gmail.com> wrote: > On 17 October 2017 at 21:38, Gurchetan Singh > <gurchetansi...@chromium.org> wrote: > > The naming is verbose and somewhat inconsistent. We have: &g

Re: [Mesa-dev] [PATCH v2 6/8] egl: add dri2_egl_surface_destroy_image_front() helper (v2)

2017-10-17 Thread Gurchetan Singh
dri2_egl_surface_destroy_image_front and dri2_egl_surface_destroy_image_back are almost identical. Why don't you just create a dri2_surface_free_image(struct dri2_egl_surface *dri2_surf, __DRIimage **img) that you will call with both the front and back images? In addition, only platform_android

Re: [Mesa-dev] [PATCH v2 2/8] egl: refactor color_buffers structure for deduplicating

2017-10-17 Thread Gurchetan Singh
Can you wrap color_buffers around: #if defined(HAVE_WAYLAND_PLATFORM) || defined(HAVE_DRM_PLATFORM) || defined(HAVE_ANDROID_PLATFORM) flags? This is because platform_surfaceless has no native surfaces and it's good to be explicit in that regard. On Fri, Oct 6, 2017 at 2:38 PM, Gwan-gyeong Mun

  1   2   >