summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texcompress_etc.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-04-19 11:44:53 -0700
committerEric Anholt <[email protected]>2013-04-30 10:40:43 -0700
commit0c883e46d871797cd1141498850d51cde6e54b76 (patch)
tree54019d9f77240229e7da69de95be45eb47de4984 /src/mesa/main/texcompress_etc.c
parente7ecc11311d142a8ac919627011372a265224bcd (diff)
swrast: Replace ImageOffsets with an ImageSlices pointer.
This is a step toward allowing drivers to use their normal mapping paths, instead of requiring that all slice mappings come from an aligned offset from the first slice's map. This incidentally fixes missing slice handling in FXT1 swrast. v2: Use slice height helper function. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/texcompress_etc.c')
-rw-r--r--src/mesa/main/texcompress_etc.c51
1 files changed, 20 insertions, 31 deletions
diff --git a/src/mesa/main/texcompress_etc.c b/src/mesa/main/texcompress_etc.c
index 442f844a5a7..a06d29f19aa 100644
--- a/src/mesa/main/texcompress_etc.c
+++ b/src/mesa/main/texcompress_etc.c
@@ -1222,8 +1222,8 @@ _mesa_unpack_etc2_format(uint8_t *dst_row,
static void
-fetch_etc1_rgb8(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
+fetch_etc1_rgb8(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j,
GLfloat *texel)
{
struct etc1_block block;
@@ -1243,9 +1243,8 @@ fetch_etc1_rgb8(const GLubyte *map, const GLuint imageOffsets[],
static void
-fetch_etc2_rgb8(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_rgb8(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
uint8_t dst[3];
@@ -1265,9 +1264,8 @@ fetch_etc2_rgb8(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_srgb8(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_srgb8(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
uint8_t dst[3];
@@ -1287,9 +1285,8 @@ fetch_etc2_srgb8(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_rgba8_eac(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_rgba8_eac(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
uint8_t dst[4];
@@ -1307,9 +1304,8 @@ fetch_etc2_rgba8_eac(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_srgb8_alpha8_eac(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_srgb8_alpha8_eac(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
uint8_t dst[4];
@@ -1327,9 +1323,8 @@ fetch_etc2_srgb8_alpha8_eac(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_r11_eac(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_r11_eac(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
GLushort dst;
@@ -1347,9 +1342,8 @@ fetch_etc2_r11_eac(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_rg11_eac(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_rg11_eac(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
GLushort dst[2];
@@ -1372,9 +1366,8 @@ fetch_etc2_rg11_eac(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_signed_r11_eac(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_signed_r11_eac(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
GLushort dst;
@@ -1392,9 +1385,8 @@ fetch_etc2_signed_r11_eac(const GLubyte *map, const GLuint imageOffsets[],
}
static void
-fetch_etc2_signed_rg11_eac(const GLubyte *map, const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
- GLfloat *texel)
+fetch_etc2_signed_rg11_eac(const GLubyte *map,
+ GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
GLushort dst[2];
@@ -1418,8 +1410,7 @@ fetch_etc2_signed_rg11_eac(const GLubyte *map, const GLuint imageOffsets[],
static void
fetch_etc2_rgb8_punchthrough_alpha1(const GLubyte *map,
- const GLuint imageOffsets[],
- GLint rowStride, GLint i, GLint j, GLint k,
+ GLint rowStride, GLint i, GLint j,
GLfloat *texel)
{
struct etc2_block block;
@@ -1440,10 +1431,8 @@ fetch_etc2_rgb8_punchthrough_alpha1(const GLubyte *map,
static void
fetch_etc2_srgb8_punchthrough_alpha1(const GLubyte *map,
- const GLuint imageOffsets[],
GLint rowStride,
- GLint i, GLint j, GLint k,
- GLfloat *texel)
+ GLint i, GLint j, GLfloat *texel)
{
struct etc2_block block;
uint8_t dst[4];