aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers/dri
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-02-07 23:28:38 +0100
committermarha <marha@users.sourceforge.net>2014-02-07 23:38:15 +0100
commit982ac918afe6a1c02d5cf735d7b6c56443a048cc (patch)
treee737eb3f7bb18d933e14f0967c1c1aa5ce5e06f6 /mesalib/src/mesa/drivers/dri
parent30af30b78075159fce477ae99cc72540133714d0 (diff)
downloadvcxsrv-982ac918afe6a1c02d5cf735d7b6c56443a048cc.tar.gz
vcxsrv-982ac918afe6a1c02d5cf735d7b6c56443a048cc.tar.bz2
vcxsrv-982ac918afe6a1c02d5cf735d7b6c56443a048cc.zip
xkbcomp xkeyboard-config libxcb libxtrans fontconfig libX11 libxcb mesa xserver git update 7 Feb 2014
Update to openssl1.0.1f xserver commit 83e38eb73fd8c852513aac2da2975b4c01070ec2 libxcb commit d7eb0bdf3b5b11ee9f40ee5e73df8fc0bdfa59f3 xkeyboard-config commit 7596672b96315465df8d8d691e3a567a52f70743 libX11 commit aacf95dacc7c598e7297894580d4d655593813b2 xkbcomp commit 31b90ee4ffc774e0da540277907fc5540c0b012c libxtrans commit 3f0de269abe59353acbd7a5587d68ce0da91db67 fontconfig commit e310d2fac2d874d5aa76c609df70cc7b871c0b6d mesa commit dd2229d4c68ed78a50104637aef904f8ab6d7dd3
Diffstat (limited to 'mesalib/src/mesa/drivers/dri')
-rw-r--r--mesalib/src/mesa/drivers/dri/common/dri_util.c44
-rw-r--r--mesalib/src/mesa/drivers/dri/common/dri_util.h4
-rw-r--r--mesalib/src/mesa/drivers/dri/common/utils.c26
-rw-r--r--mesalib/src/mesa/drivers/dri/common/utils.h2
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/swrast.c30
5 files changed, 52 insertions, 54 deletions
diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.c b/mesalib/src/mesa/drivers/dri/common/dri_util.c
index d64821112..83841def5 100644
--- a/mesalib/src/mesa/drivers/dri/common/dri_util.c
+++ b/mesalib/src/mesa/drivers/dri/common/dri_util.c
@@ -806,60 +806,60 @@ driUpdateFramebufferSize(struct gl_context *ctx, const __DRIdrawable *dPriv)
}
uint32_t
-driGLFormatToImageFormat(gl_format format)
+driGLFormatToImageFormat(mesa_format format)
{
switch (format) {
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return __DRI_IMAGE_FORMAT_RGB565;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_B8G8R8X8_UNORM:
return __DRI_IMAGE_FORMAT_XRGB8888;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
return __DRI_IMAGE_FORMAT_ARGB2101010;
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
return __DRI_IMAGE_FORMAT_XRGB2101010;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_B8G8R8A8_UNORM:
return __DRI_IMAGE_FORMAT_ARGB8888;
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_R8G8B8A8_UNORM:
return __DRI_IMAGE_FORMAT_ABGR8888;
- case MESA_FORMAT_RGBX8888_REV:
+ case MESA_FORMAT_R8G8B8X8_UNORM:
return __DRI_IMAGE_FORMAT_XBGR8888;
- case MESA_FORMAT_R8:
+ case MESA_FORMAT_R_UNORM8:
return __DRI_IMAGE_FORMAT_R8;
- case MESA_FORMAT_GR88:
+ case MESA_FORMAT_R8G8_UNORM:
return __DRI_IMAGE_FORMAT_GR88;
case MESA_FORMAT_NONE:
return __DRI_IMAGE_FORMAT_NONE;
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
return __DRI_IMAGE_FORMAT_SARGB8;
default:
return 0;
}
}
-gl_format
+mesa_format
driImageFormatToGLFormat(uint32_t image_format)
{
switch (image_format) {
case __DRI_IMAGE_FORMAT_RGB565:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_B5G6R5_UNORM;
case __DRI_IMAGE_FORMAT_XRGB8888:
- return MESA_FORMAT_XRGB8888;
+ return MESA_FORMAT_B8G8R8X8_UNORM;
case __DRI_IMAGE_FORMAT_ARGB2101010:
- return MESA_FORMAT_ARGB2101010;
+ return MESA_FORMAT_B10G10R10A2_UNORM;
case __DRI_IMAGE_FORMAT_XRGB2101010:
- return MESA_FORMAT_XRGB2101010_UNORM;
+ return MESA_FORMAT_B10G10R10X2_UNORM;
case __DRI_IMAGE_FORMAT_ARGB8888:
- return MESA_FORMAT_ARGB8888;
+ return MESA_FORMAT_B8G8R8A8_UNORM;
case __DRI_IMAGE_FORMAT_ABGR8888:
- return MESA_FORMAT_RGBA8888_REV;
+ return MESA_FORMAT_R8G8B8A8_UNORM;
case __DRI_IMAGE_FORMAT_XBGR8888:
- return MESA_FORMAT_RGBX8888_REV;
+ return MESA_FORMAT_R8G8B8X8_UNORM;
case __DRI_IMAGE_FORMAT_R8:
- return MESA_FORMAT_R8;
+ return MESA_FORMAT_R_UNORM8;
case __DRI_IMAGE_FORMAT_GR88:
- return MESA_FORMAT_GR88;
+ return MESA_FORMAT_R8G8_UNORM;
case __DRI_IMAGE_FORMAT_SARGB8:
- return MESA_FORMAT_SARGB8;
+ return MESA_FORMAT_B8G8R8A8_SRGB;
case __DRI_IMAGE_FORMAT_NONE:
return MESA_FORMAT_NONE;
default:
diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.h b/mesalib/src/mesa/drivers/dri/common/dri_util.h
index a79a4ed7a..a37a0bbbc 100644
--- a/mesalib/src/mesa/drivers/dri/common/dri_util.h
+++ b/mesalib/src/mesa/drivers/dri/common/dri_util.h
@@ -281,9 +281,9 @@ struct __DRIdrawableRec {
};
extern uint32_t
-driGLFormatToImageFormat(gl_format format);
+driGLFormatToImageFormat(mesa_format format);
-extern gl_format
+extern mesa_format
driImageFormatToGLFormat(uint32_t image_format);
extern void
diff --git a/mesalib/src/mesa/drivers/dri/common/utils.c b/mesalib/src/mesa/drivers/dri/common/utils.c
index 3e35fe2d0..1f29e0b08 100644
--- a/mesalib/src/mesa/drivers/dri/common/utils.c
+++ b/mesalib/src/mesa/drivers/dri/common/utils.c
@@ -151,7 +151,7 @@ driGetRendererString( char * buffer, const char * hardware_name,
* If the function fails and returns \c GL_FALSE, this
* value will be unmodified, but some elements in the
* linked list may be modified.
- * \param format Mesa gl_format enum describing the pixel format
+ * \param format Mesa mesa_format enum describing the pixel format
* \param depth_bits Array of depth buffer sizes to be exposed.
* \param stencil_bits Array of stencil buffer sizes to be exposed.
* \param num_depth_stencil_bits Number of entries in both \c depth_bits and
@@ -176,7 +176,7 @@ driGetRendererString( char * buffer, const char * hardware_name,
* \c format).
*/
__DRIconfig **
-driCreateConfigs(gl_format format,
+driCreateConfigs(mesa_format format,
const uint8_t * depth_bits, const uint8_t * stencil_bits,
unsigned num_depth_stencil_bits,
const GLenum * db_modes, unsigned num_db_modes,
@@ -184,15 +184,15 @@ driCreateConfigs(gl_format format,
GLboolean enable_accum)
{
static const uint32_t masks_table[][4] = {
- /* MESA_FORMAT_RGB565 */
+ /* MESA_FORMAT_B5G6R5_UNORM */
{ 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 },
- /* MESA_FORMAT_XRGB8888 */
+ /* MESA_FORMAT_B8G8R8X8_UNORM */
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
- /* MESA_FORMAT_ARGB8888 */
+ /* MESA_FORMAT_B8G8R8A8_UNORM */
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 },
- /* MESA_FORMAT_XRGB2101010_UNORM */
+ /* MESA_FORMAT_B10G10R10X2_UNORM */
{ 0x3FF00000, 0x000FFC00, 0x000003FF, 0x00000000 },
- /* MESA_FORMAT_ARGB2101010 */
+ /* MESA_FORMAT_B10G10R10A2_UNORM */
{ 0x3FF00000, 0x000FFC00, 0x000003FF, 0xC0000000 },
};
@@ -209,20 +209,20 @@ driCreateConfigs(gl_format format,
bool is_srgb;
switch (format) {
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
masks = masks_table[0];
break;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_B8G8R8X8_UNORM:
masks = masks_table[1];
break;
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_B8G8R8A8_UNORM:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
masks = masks_table[2];
break;
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
masks = masks_table[3];
break;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
masks = masks_table[4];
break;
default:
diff --git a/mesalib/src/mesa/drivers/dri/common/utils.h b/mesalib/src/mesa/drivers/dri/common/utils.h
index 22af123c3..094143446 100644
--- a/mesalib/src/mesa/drivers/dri/common/utils.h
+++ b/mesalib/src/mesa/drivers/dri/common/utils.h
@@ -48,7 +48,7 @@ struct __DRIconfigRec {
};
extern __DRIconfig **
-driCreateConfigs(gl_format format,
+driCreateConfigs(mesa_format format,
const uint8_t * depth_bits, const uint8_t * stencil_bits,
unsigned num_depth_stencil_bits,
const GLenum * db_modes, unsigned num_db_modes,
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
index 30e6805e9..071192c6f 100644
--- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c
+++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
@@ -71,19 +71,17 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
struct dri_context *dri_ctx;
int x, y, w, h;
__DRIscreen *sPriv = dPriv->driScreenPriv;
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
struct swrast_texture_image *swImage;
uint32_t internalFormat;
- gl_format texFormat;
+ mesa_format texFormat;
dri_ctx = pDRICtx->driverPrivate;
internalFormat = (texture_format == __DRI_TEXTURE_FORMAT_RGB ? 3 : 4);
- texUnit = _mesa_get_current_tex_unit(&dri_ctx->Base);
- texObj = _mesa_select_tex_object(&dri_ctx->Base, texUnit, target);
+ texObj = _mesa_get_current_tex_object(&dri_ctx->Base, target);
texImage = _mesa_get_tex_image(&dri_ctx->Base, texObj, target, 0);
swImage = swrast_texture_image(texImage);
@@ -92,9 +90,9 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
sPriv->swrast_loader->getDrawableInfo(dPriv, &x, &y, &w, &h, dPriv->loaderPrivate);
if (texture_format == __DRI_TEXTURE_FORMAT_RGB)
- texFormat = MESA_FORMAT_XRGB8888;
+ texFormat = MESA_FORMAT_B8G8R8X8_UNORM;
else
- texFormat = MESA_FORMAT_ARGB8888;
+ texFormat = MESA_FORMAT_B8G8R8A8_UNORM;
_mesa_init_teximage_fields(&dri_ctx->Base, texImage,
w, h, 1, 0, internalFormat, texFormat);
@@ -130,7 +128,7 @@ swrastFillInModes(__DRIscreen *psp,
__DRIconfig **configs;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
- gl_format format;
+ mesa_format format;
/* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't
* support pageflipping at all.
@@ -166,13 +164,13 @@ swrastFillInModes(__DRIscreen *psp,
switch (pixel_bits) {
case 16:
- format = MESA_FORMAT_RGB565;
+ format = MESA_FORMAT_B5G6R5_UNORM;
break;
case 24:
- format = MESA_FORMAT_XRGB8888;
+ format = MESA_FORMAT_B8G8R8X8_UNORM;
break;
case 32:
- format = MESA_FORMAT_ARGB8888;
+ format = MESA_FORMAT_B8G8R8A8_UNORM;
break;
default:
fprintf(stderr, "[%s:%u] bad depth %d\n", __func__, __LINE__,
@@ -345,25 +343,25 @@ swrast_new_renderbuffer(const struct gl_config *visual, __DRIdrawable *dPriv,
switch (pixel_format) {
case PF_A8R8G8B8:
- rb->Format = MESA_FORMAT_ARGB8888;
+ rb->Format = MESA_FORMAT_B8G8R8A8_UNORM;
rb->InternalFormat = GL_RGBA;
rb->_BaseFormat = GL_RGBA;
xrb->bpp = 32;
break;
case PF_X8R8G8B8:
- rb->Format = MESA_FORMAT_ARGB8888; /* XXX */
+ rb->Format = MESA_FORMAT_B8G8R8A8_UNORM; /* XXX */
rb->InternalFormat = GL_RGB;
rb->_BaseFormat = GL_RGB;
xrb->bpp = 32;
break;
case PF_R5G6B5:
- rb->Format = MESA_FORMAT_RGB565;
+ rb->Format = MESA_FORMAT_B5G6R5_UNORM;
rb->InternalFormat = GL_RGB;
rb->_BaseFormat = GL_RGB;
xrb->bpp = 16;
break;
case PF_R3G3B2:
- rb->Format = MESA_FORMAT_RGB332;
+ rb->Format = MESA_FORMAT_B2G3R3_UNORM;
rb->InternalFormat = GL_RGB;
rb->_BaseFormat = GL_RGB;
xrb->bpp = 8;
@@ -627,14 +625,14 @@ viewport(struct gl_context *ctx)
swrast_check_and_update_window_size(ctx, read);
}
-static gl_format swrastChooseTextureFormat(struct gl_context * ctx,
+static mesa_format swrastChooseTextureFormat(struct gl_context * ctx,
GLenum target,
GLint internalFormat,
GLenum format,
GLenum type)
{
if (internalFormat == GL_RGB)
- return MESA_FORMAT_XRGB8888;
+ return MESA_FORMAT_B8G8R8X8_UNORM;
return _mesa_choose_tex_format(ctx, target, internalFormat, format, type);
}