Re: [Mesa-dev] [PATCH] llvmpipe: Fix creation of shared and scanout textures.

2013-02-23 Thread John Kåre Alsaker
I'd still like to have this applied. On Tue, Dec 18, 2012 at 3:16 PM, John Kåre Alsaker john.kare.alsa...@gmail.com wrote: On Tue, Dec 18, 2012 at 11:20 AM, Jose Fonseca jfons...@vmware.com wrote: Looks fine. I'm curious, what does this fix in practice? It fixes Weston crashing when running

[Mesa-dev] [PATCH 1/3] dri: Add another duplicateImage to DRIimageExtension which allows you to create a sRGB view of a DRI image

2013-02-23 Thread John Kåre Alsaker
duplicateImage will allow you to create a linear or sRGB view into a DRIimage you have access to. This is useful because compositors may want a specific view which doesn't correspond to the one used by applications. --- include/GL/internal/dri_interface.h | 21 - 1 file

[Mesa-dev] [PATCH 2/3] gallium: Implement DRIimageExtension.duplicateImage

2013-02-23 Thread John Kåre Alsaker
--- src/gallium/include/state_tracker/st_api.h | 1 + src/gallium/state_trackers/dri/common/dri_screen.c | 1 + src/gallium/state_trackers/dri/common/dri_screen.h | 1 + src/gallium/state_trackers/dri/drm/dri2.c | 39 +- src/mesa/state_tracker/st_manager.c

[Mesa-dev] [PATCH 3/3] egl: Add MESA_image_sRGB extension.

2013-02-23 Thread John Kåre Alsaker
/MESA_image_sRGB.spec b/docs/MESA_image_sRGB.spec new file mode 100644 index 000..f8a0bea --- /dev/null +++ b/docs/MESA_image_sRGB.spec @@ -0,0 +1,132 @@ +Name + +MESA_image_sRGB + +Name Strings + +EGL_MESA_image_sRGB + +Contact + +John Kåre Alsaker john.kare.alsa...@gmail.com

Re: [Mesa-dev] [PATCH 3/3] egl: Add MESA_image_sRGB extension.

2013-02-27 Thread John Kåre Alsaker
On Mon, Feb 25, 2013 at 8:55 PM, Ian Romanick i...@freedesktop.org wrote: Also... are there piglit tests coming? Not unless you convince me otherwise. I don't think I'll be able to verify that said tests work however. More recent versions of the spec template include a section for describing

[Mesa-dev] [PATCH v2 3/5] gallium: Implement DRIimageExtension.duplicateImage

2013-03-02 Thread John Kåre Alsaker
--- src/gallium/include/state_tracker/st_api.h | 1 + src/gallium/state_trackers/dri/common/dri_screen.c | 1 + src/gallium/state_trackers/dri/common/dri_screen.h | 1 + src/gallium/state_trackers/dri/drm/dri2.c | 39 +- src/mesa/state_tracker/st_manager.c

[Mesa-dev] [PATCH v2 4/5] egl: Add MESA_image_sRGB extension.

2013-03-02 Thread John Kåre Alsaker
This gives applications access to use DRIimage.duplicateImage to create sRGB and linear views from EGL images. --- include/EGL/eglmesaext.h| 7 ++ src/egl/drivers/dri2/egl_dri2.c | 168 src/egl/drivers/dri2/egl_dri2.h | 6 +-

[Mesa-dev] [PATCH v2 piglit 5/5] egl: Add test for MESA_image_srgb

2013-03-02 Thread John Kåre Alsaker
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + *John Kåre Alsaker john.kare.alsa...@gmail.com + *Kristian Høgsberg k...@bitplanet.net + */ + +/** @file egl-mesa-image-srgb.c + * + * Test EGL_MESA_image_sRGB + */ + +#include piglit-util-gl-common.h +#include

[Mesa-dev] [PATCH v2 2/5 fixed] dri: Add another duplicateImage to DRIimageExtension

2013-03-02 Thread John Kåre Alsaker
duplicateImage will allow you to create a linear or sRGB view into a DRIimage you have access to. This is useful because compositors may want a specific view which doesn't correspond to the one used by applications. --- include/GL/internal/dri_interface.h | 20 +++- 1 file

Re: [Mesa-dev] [PATCH v2 3/5] gallium: Implement DRIimageExtension.duplicateImage

2013-03-03 Thread John Kåre Alsaker
On Sun, Mar 3, 2013 at 4:52 PM, Jakob Bornecrantz wallbra...@gmail.com wrote: Have you tested if this actually works? I would guess it would render in the right colorspace but for sampling the state tracker might just drop the format on the floor. It works for sampling, but I'm not sure what

Re: [Mesa-dev] [PATCH v2 2/5] dri: Add another duplicateImage to DRIimageExtension which allows you to create a sRGB view of a DRI image

2013-03-03 Thread John Kåre Alsaker
On Sun, Mar 3, 2013 at 4:43 PM, Jakob Bornecrantz wallbra...@gmail.com wrote: These really should just be another set of formats, since that is how they are handled gallium anyways. I think I was going that route, but changed by mind for some reason. Probably because I didn't want to add lots

[Mesa-dev] [PATCH] llvmpipe: Fix creation of shared and scanout textures.

2012-12-12 Thread John Kåre Alsaker
NOTE: This is a candidate for the stable branches. --- src/gallium/drivers/llvmpipe/lp_texture.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 2e9c6bf..f17a04a 100644 ---

Re: [Mesa-dev] [PATCH] llvmpipe: Fix creation of shared and scanout textures.

2012-12-18 Thread John Kåre Alsaker
On Tue, Dec 18, 2012 at 11:20 AM, Jose Fonseca jfons...@vmware.com wrote: Looks fine. I'm curious, what does this fix in practice? It fixes Weston crashing when running with llvmpipe. Jose - Original Message - NOTE: This is a candidate for the stable branches. ---

[Mesa-dev] [PATCH 1/4] gbm: Add sRGB formats.

2012-09-09 Thread John Kåre Alsaker
--- src/gbm/main/gbm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h index 9d2a030..32211a7 100644 --- a/src/gbm/main/gbm.h +++ b/src/gbm/main/gbm.h @@ -127,6 +127,9 @@ enum gbm_bo_format { #define GBM_FORMAT_RGBA__gbm_fourcc_code('R',

[Mesa-dev] [PATCH 2/4] gbm: Remove gbm_bo_format and add GBM_FORMAT_NONE.

2012-09-09 Thread John Kåre Alsaker
--- src/gbm/main/gbm.h | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h index 32211a7..1bc4740 100644 --- a/src/gbm/main/gbm.h +++ b/src/gbm/main/gbm.h @@ -68,19 +68,13 @@ union gbm_bo_handle { uint64_t u64; }; -/**

[Mesa-dev] [PATCH 3/4] gbm: Removed usage of gbm_bo_format from DRI backend.

2012-09-09 Thread John Kåre Alsaker
--- src/gbm/backends/dri/gbm_dri.c | 4 1 file changed, 4 deletions(-) diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index d8b1cc7..84c6de3 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -277,10 +277,8 @@

[Mesa-dev] [PATCH 4/4] gbm: Removed usage of gbm_bo_format from Gallium backend.

2012-09-09 Thread John Kåre Alsaker
--- src/gallium/state_trackers/gbm/gbm_drm.c | 44 +--- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/src/gallium/state_trackers/gbm/gbm_drm.c b/src/gallium/state_trackers/gbm/gbm_drm.c index 8490480..9f2cfe8 100644 ---

[Mesa-dev] [PATCH] llvmpipe: Fix creation of shared and scanout textures

2012-09-22 Thread John Kåre Alsaker
--- src/gallium/drivers/llvmpipe/lp_texture.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 841df00..df4417f 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++

[Mesa-dev] [PATCH] svga: Remove wierd code which forces non-sRGB formats.

2012-09-23 Thread John Kåre Alsaker
--- src/gallium/drivers/svga/svga_resource_texture.c | 8 1 file changed, 8 deletions(-) diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index 9830e79..97ec7ee 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c

Re: [Mesa-dev] [PATCH] svga: Remove wierd code which forces non-sRGB formats.

2012-09-25 Thread John Kåre Alsaker
On Mon, Sep 24, 2012 at 5:22 PM, Brian Paul bri...@vmware.com wrote: On 09/23/2012 05:44 AM, John Kåre Alsaker wrote: --- src/gallium/drivers/svga/svga_resource_texture.c | 8 1 file changed, 8 deletions(-) diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src

[Mesa-dev] Adding support for sRGB framebuffers to EGL

2012-09-25 Thread John Kåre Alsaker
Hello, I would like add support for sRGB framebuffers to EGL. Here are my proposed changes to EGL: A new EGL_SURFACE_TYPE bit: EGL_GAMMA_SRGB_BIT - This format supports sRGB framebuffers. This also means that ARB_framebuffer_sRGB is supported for this format. New values: EGL_GAMMA_LINEAR - The

Re: [Mesa-dev] Adding support for sRGB framebuffers to EGL

2012-09-26 Thread John Kåre Alsaker
The way this would interact with ARB_framebuffer_sRGB is that the EGL's surface EGL_GAMMA attribute would be ignored. If a EGL config has the EGL_GAMMA_SRGB_BIT, it is required to support sRGB for the default OpenGL framebuffer. On Tue, Sep 25, 2012 at 5:58 PM, John Kåre Alsaker john.kare.alsa

Re: [Mesa-dev] Adding support for sRGB framebuffers to EGL

2012-09-26 Thread John Kåre Alsaker
the framebuffer as an sRGB texture. EGL_GAMMA_SRGB_BIT could also optionally be disabled when the format is not supported as an sRGB texture by the hardware. On Wed, Sep 26, 2012 at 10:19 AM, John Kåre Alsaker john.kare.alsa...@gmail.com wrote: The way this would interact with ARB_framebuffer_sRGB

Re: [Mesa-dev] [PATCH] svga: Remove wierd code which forces non-sRGB formats.

2012-09-26 Thread John Kåre Alsaker
glean/readPixSanity is failing. Depth and stencil buffers are read back wrong, while RGBA is fine. On 9/25/12, Brian Paul bri...@vmware.com wrote: On 09/24/2012 11:09 PM, John Kåre Alsaker wrote: On Mon, Sep 24, 2012 at 5:22 PM, Brian Paul bri...@vmware.com mailto:bri...@vmware.com wrote

Re: [Mesa-dev] Adding support for sRGB framebuffers to EGL

2012-09-27 Thread John Kåre Alsaker
/framebuffer_sRGB.txt to see how this was handled for GLX and WGL. This is done similarly with a capability flag in GLX/WGL, but with the surface attribute moved into OpenGL (and it affects other rendertargets). -Brian On 09/26/2012 04:49 AM, John Kåre Alsaker wrote: EGL_GAMMA_SRGB_BIT

Re: [Mesa-dev] Adding support for sRGB framebuffers to EGL

2012-09-28 Thread John Kåre Alsaker
and limited to 8 bpc. On Thu, Sep 27, 2012 at 8:57 PM, John Kåre Alsaker john.kare.alsa...@gmail.com wrote: I failed to consider that premultiplied sRGB color channels can be stored two ways. The friendly way, to_srgb_gamma(color * alpha) and what applications actually use, to_srgb_gamma(color

[Mesa-dev] Adding support for sRGB KHR images to EGL

2012-09-29 Thread John Kåre Alsaker
I would like add support for sRGB KHR images to EGL. This is primarily so Wayland compositors can create sRGB views of client buffers, but there's nothing preventing it from being useful in other cases. To allow this I propose a new EGL attribute which can be passed to eglCreateImageKHR,

[Mesa-dev] [RFC 1/3] dri: Add another duplicateImage to DRIimageExtension which allows you to create a sRGB view of a DRI image

2012-09-29 Thread John Kåre Alsaker
--- include/GL/internal/dri_interface.h | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 1e0f1d0..669c7d9 100644 --- a/include/GL/internal/dri_interface.h +++

[Mesa-dev] [RFC 2/3] gallium: Implement DRIimageExtension.duplicateImage

2012-09-29 Thread John Kåre Alsaker
--- src/gallium/include/state_tracker/st_api.h | 1 + src/gallium/state_trackers/dri/common/dri_screen.c | 1 + src/gallium/state_trackers/dri/common/dri_screen.h | 1 + src/gallium/state_trackers/dri/drm/dri2.c | 32 +- src/mesa/state_tracker/st_manager.c

[Mesa-dev] [RFC 3/3] egl: Add MESA_image_sRGB extension.

2012-09-29 Thread John Kåre Alsaker
--- include/EGL/eglmesaext.h| 7 +++ src/egl/drivers/dri2/egl_dri2.c | 32 +++- src/egl/drivers/dri2/platform_android.c | 16 ++-- src/egl/drivers/dri2/platform_drm.c | 11 +++ src/egl/drivers/dri2/platform_wayland.c

Re: [Mesa-dev] Adding support for sRGB KHR images to EGL

2012-10-05 Thread John Kåre Alsaker
On Fri, Oct 5, 2012 at 12:41 AM, Eric Anholt e...@anholt.net wrote: John Kåre Alsaker john.kare.alsa...@gmail.com writes: I would like add support for sRGB KHR images to EGL. This is primarily so Wayland compositors can create sRGB views of client buffers, but there's nothing preventing

[Mesa-dev] [PATCH] svga: Add support for 16-bit per channel RGBA

2012-10-08 Thread John Kåre Alsaker
--- src/gallium/drivers/svga/svga_format.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c index 5176106..5a153a8 100644 --- a/src/gallium/drivers/svga/svga_format.c +++

Re: [Mesa-dev] Adding support for sRGB KHR images to EGL

2012-10-08 Thread John Kåre Alsaker
John Kåre Alsaker john.kare.alsa...@gmail.com Status Proposal Version Version 1, October 9, 2012 Number EGL Extension #not assigned Dependencies EGL 1.2 or later is required. EGL_KHR_image_base is required. This extension is written against the wording of the EGL 1.2

Re: [Mesa-dev] [PATCH] svga: Add support for 16-bit per channel RGBA

2012-10-10 Thread John Kåre Alsaker
It just fixes posterization when rendering in linear space. It's also required for having 64 bpp Wayland clients. On Thu, Oct 11, 2012 at 2:18 AM, Brian Paul brian.e.p...@gmail.com wrote: On Mon, Oct 8, 2012 at 4:50 PM, John Kåre Alsaker john.kare.alsa...@gmail.com wrote: --- src/gallium

[Mesa-dev] [PATCH] Cut down false positives when running the Clang Analyzer.

2012-10-11 Thread John Kåre Alsaker
--- src/gallium/auxiliary/util/u_debug.h | 2 +- src/gallium/include/pipe/p_compiler.h | 12 src/mapi/glapi/gen/gl_table.py| 14 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_debug.h

[Mesa-dev] [PATCH] llvmpipe: Fix creation for shared and scanout.

2012-10-24 Thread John Kåre Alsaker
NOTE: This is a candidate for the stable branches. --- src/gallium/drivers/llvmpipe/lp_texture.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index b4ea94c..ccea4e2 100644 ---

[Mesa-dev] [PATCH] Cut down false positives when running the Clang Analyzer.

2014-04-24 Thread John Kåre Alsaker
--- src/mapi/glapi/gen/gl_table.py | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/gl_table.py b/src/mapi/glapi/gen/gl_table.py index fd38468..d4075ff 100644 --- a/src/mapi/glapi/gen/gl_table.py +++ b/src/mapi/glapi/gen/gl_table.py @@ -101,10

[Mesa-dev] [PATCH v3 2/5] dri: Add another duplicateImage to DRIimageExtension

2014-04-26 Thread John Kåre Alsaker
duplicateImage will allow you to create a linear or sRGB view into a DRIimage you have access to. This is useful because compositors may want a specific view which doesn't correspond to the one used by applications. --- include/GL/internal/dri_interface.h | 20 +++- 1 file

Re: [Mesa-dev] [PATCH mesa 4/7] Add the EGL_MESA_configless_context extension

2014-05-03 Thread John Kåre Alsaker
This commit results in garbage output for r600g when building with OpenGL (not ES) as enabled by my patches: https://github.com/Zoxc/weston/commits/gl-rebase. (--enable-opengl on configure) It works on i965 so I was wondering how well tested this is on Gallium drivers? On Fri, Mar 7, 2014 at