mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[MESA]
- Those files where not included to the commit for some obscure reason. svn path=/trunk/; revision=60489
This commit is contained in:
@@ -35,13 +35,6 @@
|
||||
#include "texstore.h"
|
||||
#include "image.h"
|
||||
#include "macros.h"
|
||||
#if 0
|
||||
#include "../../gallium/auxiliary/util/u_format_rgb9e5.h"
|
||||
#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h"
|
||||
#else
|
||||
#include "u_format_rgb9e5.h"
|
||||
#include "u_format_r11g11b10f.h"
|
||||
#endif
|
||||
|
||||
|
||||
static GLint
|
||||
@@ -678,44 +671,6 @@ do_row(GLenum datatype, GLuint comps, GLint srcWidth,
|
||||
}
|
||||
}
|
||||
|
||||
else if (datatype == GL_UNSIGNED_INT_5_9_9_9_REV && comps == 3) {
|
||||
GLuint i, j, k;
|
||||
const GLuint *rowA = (const GLuint*) srcRowA;
|
||||
const GLuint *rowB = (const GLuint*) srcRowB;
|
||||
GLuint *dst = (GLuint*)dstRow;
|
||||
GLfloat res[3], rowAj[3], rowBj[3], rowAk[3], rowBk[3];
|
||||
for (i = j = 0, k = k0; i < (GLuint) dstWidth;
|
||||
i++, j += colStride, k += colStride) {
|
||||
rgb9e5_to_float3(rowA[j], rowAj);
|
||||
rgb9e5_to_float3(rowB[j], rowBj);
|
||||
rgb9e5_to_float3(rowA[k], rowAk);
|
||||
rgb9e5_to_float3(rowB[k], rowBk);
|
||||
res[0] = (rowAj[0] + rowAk[0] + rowBj[0] + rowBk[0]) * 0.25F;
|
||||
res[1] = (rowAj[1] + rowAk[1] + rowBj[1] + rowBk[1]) * 0.25F;
|
||||
res[2] = (rowAj[2] + rowAk[2] + rowBj[2] + rowBk[2]) * 0.25F;
|
||||
dst[i] = float3_to_rgb9e5(res);
|
||||
}
|
||||
}
|
||||
|
||||
else if (datatype == GL_UNSIGNED_INT_10F_11F_11F_REV && comps == 3) {
|
||||
GLuint i, j, k;
|
||||
const GLuint *rowA = (const GLuint*) srcRowA;
|
||||
const GLuint *rowB = (const GLuint*) srcRowB;
|
||||
GLuint *dst = (GLuint*)dstRow;
|
||||
GLfloat res[3], rowAj[3], rowBj[3], rowAk[3], rowBk[3];
|
||||
for (i = j = 0, k = k0; i < (GLuint) dstWidth;
|
||||
i++, j += colStride, k += colStride) {
|
||||
r11g11b10f_to_float3(rowA[j], rowAj);
|
||||
r11g11b10f_to_float3(rowB[j], rowBj);
|
||||
r11g11b10f_to_float3(rowA[k], rowAk);
|
||||
r11g11b10f_to_float3(rowB[k], rowBk);
|
||||
res[0] = (rowAj[0] + rowAk[0] + rowBj[0] + rowBk[0]) * 0.25F;
|
||||
res[1] = (rowAj[1] + rowAk[1] + rowBj[1] + rowBk[1]) * 0.25F;
|
||||
res[2] = (rowAj[2] + rowAk[2] + rowBj[2] + rowBk[2]) * 0.25F;
|
||||
dst[i] = float3_to_r11g11b10f(res);
|
||||
}
|
||||
}
|
||||
|
||||
else if (datatype == GL_FLOAT_32_UNSIGNED_INT_24_8_REV && comps == 1) {
|
||||
GLuint i, j, k;
|
||||
const GLfloat *rowA = (const GLfloat *) srcRowA;
|
||||
@@ -1338,60 +1293,6 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth,
|
||||
}
|
||||
}
|
||||
|
||||
else if (datatype == GL_UNSIGNED_INT_5_9_9_9_REV && comps == 3) {
|
||||
DECLARE_ROW_POINTERS0(GLuint);
|
||||
|
||||
GLfloat res[3];
|
||||
GLfloat rowAj[3], rowBj[3], rowCj[3], rowDj[3];
|
||||
GLfloat rowAk[3], rowBk[3], rowCk[3], rowDk[3];
|
||||
|
||||
for (i = j = 0, k = k0; i < (GLuint) dstWidth;
|
||||
i++, j += colStride, k += colStride) {
|
||||
rgb9e5_to_float3(rowA[j], rowAj);
|
||||
rgb9e5_to_float3(rowB[j], rowBj);
|
||||
rgb9e5_to_float3(rowC[j], rowCj);
|
||||
rgb9e5_to_float3(rowD[j], rowDj);
|
||||
rgb9e5_to_float3(rowA[k], rowAk);
|
||||
rgb9e5_to_float3(rowB[k], rowBk);
|
||||
rgb9e5_to_float3(rowC[k], rowCk);
|
||||
rgb9e5_to_float3(rowD[k], rowDk);
|
||||
res[0] = (rowAj[0] + rowAk[0] + rowBj[0] + rowBk[0] +
|
||||
rowCj[0] + rowCk[0] + rowDj[0] + rowDk[0]) * 0.125F;
|
||||
res[1] = (rowAj[1] + rowAk[1] + rowBj[1] + rowBk[1] +
|
||||
rowCj[1] + rowCk[1] + rowDj[1] + rowDk[1]) * 0.125F;
|
||||
res[2] = (rowAj[2] + rowAk[2] + rowBj[2] + rowBk[2] +
|
||||
rowCj[2] + rowCk[2] + rowDj[2] + rowDk[2]) * 0.125F;
|
||||
dst[i] = float3_to_rgb9e5(res);
|
||||
}
|
||||
}
|
||||
|
||||
else if (datatype == GL_UNSIGNED_INT_10F_11F_11F_REV && comps == 3) {
|
||||
DECLARE_ROW_POINTERS0(GLuint);
|
||||
|
||||
GLfloat res[3];
|
||||
GLfloat rowAj[3], rowBj[3], rowCj[3], rowDj[3];
|
||||
GLfloat rowAk[3], rowBk[3], rowCk[3], rowDk[3];
|
||||
|
||||
for (i = j = 0, k = k0; i < (GLuint) dstWidth;
|
||||
i++, j += colStride, k += colStride) {
|
||||
r11g11b10f_to_float3(rowA[j], rowAj);
|
||||
r11g11b10f_to_float3(rowB[j], rowBj);
|
||||
r11g11b10f_to_float3(rowC[j], rowCj);
|
||||
r11g11b10f_to_float3(rowD[j], rowDj);
|
||||
r11g11b10f_to_float3(rowA[k], rowAk);
|
||||
r11g11b10f_to_float3(rowB[k], rowBk);
|
||||
r11g11b10f_to_float3(rowC[k], rowCk);
|
||||
r11g11b10f_to_float3(rowD[k], rowDk);
|
||||
res[0] = (rowAj[0] + rowAk[0] + rowBj[0] + rowBk[0] +
|
||||
rowCj[0] + rowCk[0] + rowDj[0] + rowDk[0]) * 0.125F;
|
||||
res[1] = (rowAj[1] + rowAk[1] + rowBj[1] + rowBk[1] +
|
||||
rowCj[1] + rowCk[1] + rowDj[1] + rowDk[1]) * 0.125F;
|
||||
res[2] = (rowAj[2] + rowAk[2] + rowBj[2] + rowBk[2] +
|
||||
rowCj[2] + rowCk[2] + rowDj[2] + rowDk[2]) * 0.125F;
|
||||
dst[i] = float3_to_r11g11b10f(res);
|
||||
}
|
||||
}
|
||||
|
||||
else if (datatype == GL_FLOAT_32_UNSIGNED_INT_24_8_REV && comps == 1) {
|
||||
DECLARE_ROW_POINTERS(GLfloat, 2);
|
||||
|
||||
|
||||
@@ -39,13 +39,6 @@
|
||||
#include "pack.h"
|
||||
#include "pixeltransfer.h"
|
||||
#include "imports.h"
|
||||
#if 0
|
||||
#include "../../gallium/auxiliary/util/u_format_rgb9e5.h"
|
||||
#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h"
|
||||
#else
|
||||
#include "u_format_rgb9e5.h"
|
||||
#include "u_format_r11g11b10f.h"
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
@@ -1999,22 +1992,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_UNSIGNED_INT_5_9_9_9_REV:
|
||||
{
|
||||
GLuint *dst = (GLuint *) dstAddr;
|
||||
for (i = 0; i < n; i++) {
|
||||
dst[i] = float3_to_rgb9e5(rgba[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_UNSIGNED_INT_10F_11F_11F_REV:
|
||||
{
|
||||
GLuint *dst = (GLuint *) dstAddr;
|
||||
for (i = 0; i < n; i++) {
|
||||
dst[i] = float3_to_r11g11b10f(rgba[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_mesa_problem(ctx, "bad type in _mesa_pack_rgba_span_float");
|
||||
free(luminance);
|
||||
@@ -2947,62 +2924,6 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_UNSIGNED_INT_5_9_9_9_REV:
|
||||
if (swapBytes) {
|
||||
const GLuint *uisrc = (const GLuint *) src;
|
||||
GLuint i;
|
||||
GLfloat f[3];
|
||||
for (i = 0; i < n; i ++) {
|
||||
GLuint p = uisrc[i];
|
||||
SWAP4BYTE(p);
|
||||
rgb9e5_to_float3(p, f);
|
||||
rgba[i][rDst] = f[0];
|
||||
rgba[i][gDst] = f[1];
|
||||
rgba[i][bDst] = f[2];
|
||||
rgba[i][aDst] = 1.0F;
|
||||
}
|
||||
}
|
||||
else {
|
||||
const GLuint *uisrc = (const GLuint *) src;
|
||||
GLuint i;
|
||||
GLfloat f[3];
|
||||
for (i = 0; i < n; i ++) {
|
||||
rgb9e5_to_float3(uisrc[i], f);
|
||||
rgba[i][rDst] = f[0];
|
||||
rgba[i][gDst] = f[1];
|
||||
rgba[i][bDst] = f[2];
|
||||
rgba[i][aDst] = 1.0F;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_UNSIGNED_INT_10F_11F_11F_REV:
|
||||
if (swapBytes) {
|
||||
const GLuint *uisrc = (const GLuint *) src;
|
||||
GLuint i;
|
||||
GLfloat f[3];
|
||||
for (i = 0; i < n; i ++) {
|
||||
GLuint p = uisrc[i];
|
||||
SWAP4BYTE(p);
|
||||
r11g11b10f_to_float3(p, f);
|
||||
rgba[i][rDst] = f[0];
|
||||
rgba[i][gDst] = f[1];
|
||||
rgba[i][bDst] = f[2];
|
||||
rgba[i][aDst] = 1.0F;
|
||||
}
|
||||
}
|
||||
else {
|
||||
const GLuint *uisrc = (const GLuint *) src;
|
||||
GLuint i;
|
||||
GLfloat f[3];
|
||||
for (i = 0; i < n; i ++) {
|
||||
r11g11b10f_to_float3(uisrc[i], f);
|
||||
rgba[i][rDst] = f[0];
|
||||
rgba[i][gDst] = f[1];
|
||||
rgba[i][bDst] = f[2];
|
||||
rgba[i][aDst] = 1.0F;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_mesa_problem(NULL, "bad srcType in extract float data");
|
||||
break;
|
||||
@@ -3448,64 +3369,6 @@ extract_uint_rgba(GLuint n, GLuint rgba[][4],
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_UNSIGNED_INT_5_9_9_9_REV:
|
||||
if (swapBytes) {
|
||||
const GLuint *uisrc = (const GLuint *) src;
|
||||
GLuint i;
|
||||
float f[3];
|
||||
for (i = 0; i < n; i ++) {
|
||||
GLuint p = uisrc[i];
|
||||
SWAP4BYTE(p);
|
||||
rgb9e5_to_float3(p, f);
|
||||
rgba[i][rDst] = clamp_float_to_uint(f[0]);
|
||||
rgba[i][gDst] = clamp_float_to_uint(f[1]);
|
||||
rgba[i][bDst] = clamp_float_to_uint(f[2]);
|
||||
rgba[i][aDst] = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
const GLuint *uisrc = (const GLuint *) src;
|
||||
GLuint i;
|
||||
float f[3];
|
||||
for (i = 0; i < n; i ++) {
|
||||
GLuint p = uisrc[i];
|
||||
rgb9e5_to_float3(p, f);
|
||||
rgba[i][rDst] = clamp_float_to_uint(f[0]);
|
||||
rgba[i][gDst] = clamp_float_to_uint(f[1]);
|
||||
rgba[i][bDst] = clamp_float_to_uint(f[2]);
|
||||
rgba[i][aDst] = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_UNSIGNED_INT_10F_11F_11F_REV:
|
||||
if (swapBytes) {
|
||||
const GLuint *uisrc = (const GLuint *) src;
|
||||
GLuint i;
|
||||
float f[3];
|
||||
for (i = 0; i < n; i ++) {
|
||||
GLuint p = uisrc[i];
|
||||
SWAP4BYTE(p);
|
||||
r11g11b10f_to_float3(p, f);
|
||||
rgba[i][rDst] = clamp_float_to_uint(f[0]);
|
||||
rgba[i][gDst] = clamp_float_to_uint(f[1]);
|
||||
rgba[i][bDst] = clamp_float_to_uint(f[2]);
|
||||
rgba[i][aDst] = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
const GLuint *uisrc = (const GLuint *) src;
|
||||
GLuint i;
|
||||
float f[3];
|
||||
for (i = 0; i < n; i ++) {
|
||||
GLuint p = uisrc[i];
|
||||
r11g11b10f_to_float3(p, f);
|
||||
rgba[i][rDst] = clamp_float_to_uint(f[0]);
|
||||
rgba[i][gDst] = clamp_float_to_uint(f[1]);
|
||||
rgba[i][bDst] = clamp_float_to_uint(f[2]);
|
||||
rgba[i][aDst] = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_mesa_problem(NULL, "bad srcType in extract uint data");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user