diff options
author | marha <marha@users.sourceforge.net> | 2012-02-13 08:50:32 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-02-13 08:50:32 +0100 |
commit | 179ebdfaf7fe0a0017054c052b76210eeff084a9 (patch) | |
tree | 5daa6e5583ced6a6b12b03e12c16ef2acedb5b5c /mesalib/src/mesa/state_tracker/st_atom_pixeltransfer.c | |
parent | 535951cba015f2a2b63292e0ca983d0d6e736b71 (diff) | |
parent | eaa70945cb3f1a432b8c505ecede9ebc7769f36d (diff) | |
download | vcxsrv-179ebdfaf7fe0a0017054c052b76210eeff084a9.tar.gz vcxsrv-179ebdfaf7fe0a0017054c052b76210eeff084a9.tar.bz2 vcxsrv-179ebdfaf7fe0a0017054c052b76210eeff084a9.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_pixeltransfer.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_pixeltransfer.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_pixeltransfer.c b/mesalib/src/mesa/state_tracker/st_atom_pixeltransfer.c index fb1e4092c..8d2317ea1 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_pixeltransfer.c +++ b/mesalib/src/mesa/state_tracker/st_atom_pixeltransfer.c @@ -116,11 +116,12 @@ load_color_map_texture(struct gl_context *ctx, struct pipe_resource *pt) for (j = 0; j < texSize; j++) { union util_color uc; int k = (i * texSize + j); - ubyte r = ctx->PixelMaps.RtoR.Map8[j * rSize / texSize]; - ubyte g = ctx->PixelMaps.GtoG.Map8[i * gSize / texSize]; - ubyte b = ctx->PixelMaps.BtoB.Map8[j * bSize / texSize]; - ubyte a = ctx->PixelMaps.AtoA.Map8[i * aSize / texSize]; - util_pack_color_ub(r, g, b, a, pt->format, &uc); + float rgba[4]; + rgba[0] = ctx->PixelMaps.RtoR.Map[j * rSize / texSize]; + rgba[1] = ctx->PixelMaps.GtoG.Map[i * gSize / texSize]; + rgba[2] = ctx->PixelMaps.BtoB.Map[j * bSize / texSize]; + rgba[3] = ctx->PixelMaps.AtoA.Map[i * aSize / texSize]; + util_pack_color(rgba, pt->format, &uc); *(dest + k) = uc.ui; } } |