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 Jakob Bornecrantz
On Sun, Mar 3, 2013 at 7:03 AM, John Kåre Alsaker
john.kare.alsa...@gmail.com wrote:
 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 changed, 20 insertions(+), 1 deletion(-)

 diff --git a/include/GL/internal/dri_interface.h 
 b/include/GL/internal/dri_interface.h
 index 42147e9..f4948a8 100644
 --- a/include/GL/internal/dri_interface.h
 +++ b/include/GL/internal/dri_interface.h
 @@ -938,7 +938,7 @@ struct __DRIdri2ExtensionRec {
   * extensions.
   */
  #define __DRI_IMAGE DRI_IMAGE
 -#define __DRI_IMAGE_VERSION 6
 +#define __DRI_IMAGE_VERSION 7

  /**
   * These formats correspond to the similarly named MESA_FORMAT_*
 @@ -1009,6 +1009,15 @@ struct __DRIdri2ExtensionRec {
  #define __DRI_IMAGE_COMPONENTS_Y_UV0x3004
  #define __DRI_IMAGE_COMPONENTS_Y_XUXV  0x3005

 +/**
 + * Flags for duplicateImage.
 + *
 + * \since 7
 + */
 +
 +#define __DRI_IMAGE_FLAG_SRGB_VIEW 0x0001
 +#define __DRI_IMAGE_FLAG_LINEAR_VIEW   0x0002
 +

These really should just be another set of formats, since that is
how they are handled gallium anyways.

Cheers, Jakob.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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 of sRGB formats and it
doesn't interact well with planar/fourcc formats.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev