[Mesa-dev] [PATCH] anv/x11: Add support for Xlib platform

2016-08-11 Thread Kevin Strasser
Some applications continue to use the Xlib client library and expect that VK_KHR_xlib_surface will be available in the driver. Service these applications by converting the Display pointer to xcb_connection_t and use the existing xcb code in the driver. Signed-off-by: Kevin Strasser <kevin.st

[Mesa-dev] [PATCH] anv/x11: Add support for Xlib platform

2016-08-14 Thread Kevin Strasser
Some applications continue to use the Xlib client library and expect that VK_KHR_xlib_surface will be available in the driver. Service these applications by converting the Display pointer to xcb_connection_t and use the existing xcb code in the driver. Signed-off-by: Kevin Strasser <kevin.st

[Mesa-dev] [PATCH v2] anv/x11: Add support for Xlib platform

2016-08-12 Thread Kevin Strasser
Some applications continue to use the Xlib client library and expect that VK_KHR_xlib_surface will be available in the driver. Service these applications by converting the Display pointer to xcb_connection_t and use the existing xcb code in the driver. Signed-off-by: Kevin Strasser <kevin.st

[Mesa-dev] [PATCH 1/2] mesa/extensions: expose EXT_texture_compression_s3tc for ES2

2016-09-22 Thread Kevin Strasser
The extension spec has been revised to include dependencies for OpenGL ES 2 and 3. Signed-off-by: Kevin Strasser <kevin.stras...@intel.com> --- src/mesa/main/extensions_table.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/extensions_table.h b/src/mes

[Mesa-dev] [PATCH 2/2] mesa/extensions: expose OES_vertex_half_float for ES2

2016-09-22 Thread Kevin Strasser
Half float support already exists for desktop GL. Reuse the ARB_half_float_vertex enable bit and account for the different enum to enable the extension for ES2. Signed-off-by: Kevin Strasser <kevin.stras...@intel.com> --- src/mesa/main/extensions_table.h | 1 + src/mesa/main/va

[Mesa-dev] [PATCH v2] mesa/extensions: expose OES_vertex_half_float for ES2

2016-10-10 Thread Kevin Strasser
Half float support already exists for desktop GL. Reuse the ARB_half_float_vertex enable bit and account for the different enum to enable the extension for ES2. Signed-off-by: Kevin Strasser <kevin.stras...@intel.com> Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> --- src/mesa

[Mesa-dev] [PATCH] anv/allocator: Loosen the size restriction on imported BOs

2017-08-02 Thread Kevin Strasser
the actual size of the BO. Signed-off-by: Kevin Strasser <kevin.stras...@intel.com> --- src/intel/vulkan/anv_allocator.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index efaaebc..1fb3756

[Mesa-dev] [PATCH] anv/android: handle storage images in vkGetSwapchainGrallocUsageANDROID

2018-09-06 Thread Kevin Strasser
and whitelist a pair of formats so that existing versions of Android can pass these tests. Fixes: dEQP-VK.wsi.android.* Signed-off-by: Kevin Strasser --- src/intel/vulkan/anv_android.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/intel/vulkan

[Mesa-dev] [PATCH] anv: Fix close(fd) before import issue in vkCreateDmaBufImageINTEL

2018-04-03 Thread Kevin Strasser
If we close the fd before calling DRM_IOCTL_PRIME_FD_TO_HANDLE the kernel will hit a -EBADF error. Move the close(fd) call to the end of anv_CreateDmaBufImageINTEL(). Signed-off-by: Kevin Strasser <kevin.stras...@intel.com> --- src/intel/vulkan/anv_intel.c | 4 ++-- 1 file changed, 2 inse

[Mesa-dev] [RFC 4/6] dri: Enable fp16 configs and visuals

2019-01-04 Thread Kevin Strasser
loaders can indicate if they know how to handle fp16 formats. Add visuals to gallium and i965, leverage existing offscreen render support for MESA_FORMAT_RGBA_FLOAT16 and MESA_FORMAT_RGBX_FLOAT16. Signed-off-by: Kevin Strasser --- include/GL/internal/dri_interface.h| 5 +++ src/egl

[Mesa-dev] [RFC 2/6] dri: Set bit for float configs

2019-01-04 Thread Kevin Strasser
Populate __DRI_ATTRIB_FLOAT_BIT, such that we can filter for formats containing floating point pixel data and egl/glx can satisfy the requirements for their respective extensions. Signed-off-by: Kevin Strasser --- src/egl/drivers/dri2/egl_dri2.c | 2 ++ src/egl/drivers/dri2/platform_drm.c

[Mesa-dev] [RFC 6/6] gbm: Add visuals and buffer handling for fp16 formats

2019-01-04 Thread Kevin Strasser
Set loader caps indicating that gbm can handle both rgba ordering and fp16 formats. Signed-off-by: Kevin Strasser --- src/gbm/backends/dri/gbm_dri.c | 26 +- src/gbm/main/gbm.c | 3 +++ src/gbm/main/gbm.h | 9 + 3 files changed, 37

[Mesa-dev] [RFC 1/6] dri: Support 64 bit rgba masks

2019-01-04 Thread Kevin Strasser
The dri core api was written with the assumption that all attribute values would fit into 32 bits. This limitation means the config handlers can't accept 64 bpp formats. Reserve 64 bits for rgba masks and add new attributes that allow access to the upper 32 bits. Signed-off-by: Kevin Strasser

[Mesa-dev] [RFC 0/6] Enable fp16 visuals and fbconfigs

2019-01-04 Thread Kevin Strasser
/kmscube/commits/fp16 Kevin Strasser (6): dri: Support 64 bit rgba masks dri: Set bit for float configs drm-uapi: Add fp16 formats to drm_fourcc.h dri: Enable fp16 configs and visuals gallium/winsys/kms: Respect format bpp gbm: Add visuals and buffer handling for fp16 formats include/GL

[Mesa-dev] [RFC 5/6] gallium/winsys/kms: Respect format bpp

2019-01-04 Thread Kevin Strasser
Needed for allocating buffers with pixel formats wider than 32 bpp. Signed-off-by: Kevin Strasser --- src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c b/src/gallium/winsys/sw

[Mesa-dev] [RFC 3/6] drm-uapi: Add fp16 formats to drm_fourcc.h

2019-01-04 Thread Kevin Strasser
Add 64 bpp 16:16:16:16 half float pixel formats. Each 16 bit component is formatted in IEEE-754 half-precision float (binary16) 1:5:10 MSb-sign:exponent:fraction form. Signed-off-by: Kevin Strasser --- include/drm-uapi/drm_fourcc.h | 8 1 file changed, 8 insertions(+) diff --git

[Mesa-dev] [PATCH 04/13] egl: Convert configs to use shifts instead of masks

2019-01-28 Thread Kevin Strasser
with ffs. Signed-off-by: Kevin Strasser --- src/egl/drivers/dri2/egl_dri2.c | 61 + src/egl/drivers/dri2/egl_dri2.h | 8 +++- src/egl/drivers/dri2/platform_android.c | 12 +++--- src/egl/drivers/dri2/platform_drm.c | 41

[Mesa-dev] [PATCH 09/13] dri: Define allow_fp16_configs and DRI_LOADER_CAP_FP16

2019-01-28 Thread Kevin Strasser
Introduce a new dri configuration option so users can disable exposure of fp16 formats, following the same design and policy of rgb10a2 (opt-in for i965 and opt-out for gallium). Also, add a loader cap field so loaders can indicate if they know how to handle fp16 formats. Signed-off-by: Kevin

[Mesa-dev] [PATCH 13/13] wayland: Add buffer handling and visuals for fp16 formats

2019-01-28 Thread Kevin Strasser
Set loader caps indicating that wayland can handle both rgba ordering and fp16 formats. NOTE: This requries libwayland to provide definitions for WL_SHM_FORMAT_XBGR16161616F and WL_SHM_FORMAT_ABGR16161616F Signed-off-by: Kevin Strasser --- src/egl/drivers/dri2/platform_wayland.c | 30

[Mesa-dev] [PATCH 06/13] dri: Handle configs with floating point pixel data

2019-01-28 Thread Kevin Strasser
In order to handle pixel formats that consist of floating point data, enable floatMode field in the dri config, and set __DRI_ATTRIB_FLOAT_BIT in the render type attribute. Signed-off-by: Kevin Strasser --- src/mesa/drivers/dri/common/utils.c | 5 + 1 file changed, 5 insertions(+) diff

[Mesa-dev] [PATCH 05/13] glx: Add fields for color shifts

2019-01-28 Thread Kevin Strasser
glx doesn't read the masks from the dri config directly, but for consistency add shifts to the glxconfig. Signed-off-by: Kevin Strasser --- src/glx/dri_common.c | 4 src/glx/glxconfig.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index

[Mesa-dev] [PATCH 01/13] egl/dri: Avoid out of bounds array access

2019-01-28 Thread Kevin Strasser
indexConfigAttrib iterates over every index in the dri driver, possibly exceeding __DRI_ATTRIB_MAX. In other words, if the dri driver has newer attributes libEGL will end up reading from uninitialized memory through dri2_to_egl_attribute_map[]. Signed-off-by: Kevin Strasser Cc: mesa-sta

[Mesa-dev] [PATCH 07/13] egl: Handle dri configs with floating point pixel data

2019-01-28 Thread Kevin Strasser
In the case that __DRI_ATTRIB_FLOAT_BIT is set in the dri config, set EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT in the egl config. Add a field to each platform driver visual to indicate if it has components that are in floating point form. Signed-off-by: Kevin Strasser --- src/egl/drivers/dri2

[Mesa-dev] [PATCH 02/13] drm-uapi: Add fp16 formats to drm_fourcc.h

2019-01-28 Thread Kevin Strasser
Add 64 bpp 16:16:16:16 half float pixel formats. Each 16 bit component is formatted in IEEE-754 half-precision float (binary16) 1:5:10 MSb-sign:exponent:fraction form. Signed-off-by: Kevin Strasser --- include/drm-uapi/drm_fourcc.h | 9 + 1 file changed, 9 insertions(+) diff --git

[Mesa-dev] [PATCH 03/13] dri: Add config attributes for color channel shift

2019-01-28 Thread Kevin Strasser
, we set the masks to 0 for any formats wider than 32 bpp. Signed-off-by: Kevin Strasser --- include/GL/internal/dri_interface.h | 6 +- src/mesa/drivers/dri/common/utils.c | 41 + src/mesa/main/context.c | 6 +++--- src/mesa/main/mtypes.h

[Mesa-dev] [PATCH 00/13] Enable fp16 visuals and fbconfigs

2019-01-28 Thread Kevin Strasser
/fp16 Kevin Strasser (13): egl/dri: Avoid out of bounds array access drm-uapi: Add fp16 formats to drm_fourcc.h dri: Add config attributes for color channel shift egl: Convert configs to use shifts instead of masks glx: Add fields for color shifts dri: Handle configs with floating point

[Mesa-dev] [PATCH 08/13] dri: Add fp16 formats

2019-01-28 Thread Kevin Strasser
Add dri formats for RGBA ordered 64 bpp IEEE 754 half precision floating point. Leverage existing offscreen render support for MESA_FORMAT_RGBA_FLOAT16 and MESA_FORMAT_RGBX_FLOAT16. Signed-off-by: Kevin Strasser --- include/GL/internal/dri_interface.h| 4 src/loader

[Mesa-dev] [PATCH 11/13] gallium: Add buffer and configs handling or fp16 formats

2019-01-28 Thread Kevin Strasser
Expose configs when allow_fp16_configs has been enabled and DRI_LOADER_CAP_FP16 is set in the loader. Also, make kms_swrast_dri respect format bpp, to allow for allocating buffers wider than 32 bpp. Signed-off-by: Kevin Strasser --- src/gallium/state_trackers/dri/dri2.c | 22

[Mesa-dev] [PATCH 10/13] i965: Add handling for fp16 configs

2019-01-28 Thread Kevin Strasser
Expose configs when allow_fp16_configs has been enabled and DRI_LOADER_CAP_FP16 is set in the loader. Signed-off-by: Kevin Strasser --- src/mesa/drivers/dri/i965/intel_screen.c | 38 +--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers

[Mesa-dev] [PATCH 12/13] gbm: Add buffer handling and visuals for fp16 formats

2019-01-28 Thread Kevin Strasser
Set loader caps indicating that gbm can handle both rgba ordering and fp16 formats. Signed-off-by: Kevin Strasser --- src/egl/drivers/dri2/egl_dri2.c | 2 ++ src/gbm/backends/dri/gbm_dri.c | 26 +- src/gbm/main/gbm.c | 3 +++ src/gbm/main/gbm.h