Commit f8b0a7f6 authored by Keith Whitwell's avatar Keith Whitwell
Browse files

Merge commit 'origin/master' into gallium-resources

Conflicts:
	src/gallium/drivers/r300/r300_texture.c
parents a3c99807 f43c679c
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 7.8.2 Release Notes / April, 5, 2010</H1>
<p>
Mesa 7.8.2 is a bug fix release which fixes bugs found since the 7.8.1 release.
</p>
<p>
Mesa 7.8.2 implements the OpenGL 2.1 API, but the version reported by
glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
<h2>MD5 checksums</h2>
<pre>
tbd
</pre>
<h2>New features</h2>
<p>None.</p>
<h2>Bug fixes</h2>
<ul>
<li>Fixed Gallium glDrawPixels(GL_DEPTH_COMPONENT).
</ul>
<h2>Changes</h2>
<p>None.</p>
</body>
</html>
......@@ -13,6 +13,7 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<LI><A HREF="relnotes-7.8.2.html">7.8.2 release notes</A>
<LI><A HREF="relnotes-7.8.1.html">7.8.1 release notes</A>
<LI><A HREF="relnotes-7.8.html">7.8 release notes</A>
<LI><A HREF="relnotes-7.7.1.html">7.7.1 release notes</A>
......
......@@ -14,12 +14,13 @@
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* Authors:
* Chia-I Wu <olv@lunarg.com>
......
......@@ -71,7 +71,7 @@ print_packed(const struct util_format_description *format_desc,
static void
print_unpacked_doubl(const struct util_format_description *format_desc,
print_unpacked_rgba_doubl(const struct util_format_description *format_desc,
const char *prefix,
const double unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4],
const char *suffix)
......@@ -92,9 +92,9 @@ print_unpacked_doubl(const struct util_format_description *format_desc,
static void
print_unpacked_float(const struct util_format_description *format_desc,
print_unpacked_rgba_float(const struct util_format_description *format_desc,
const char *prefix,
const float unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4],
float unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4],
const char *suffix)
{
unsigned i, j;
......@@ -113,9 +113,9 @@ print_unpacked_float(const struct util_format_description *format_desc,
static void
print_unpacked_8unorm(const struct util_format_description *format_desc,
print_unpacked_rgba_8unorm(const struct util_format_description *format_desc,
const char *prefix,
const uint8_t unpacked[][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4],
uint8_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4],
const char *suffix)
{
unsigned i, j;
......@@ -132,9 +132,70 @@ print_unpacked_8unorm(const struct util_format_description *format_desc,
}
static void
print_unpacked_z_float(const struct util_format_description *format_desc,
const char *prefix,
float unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH],
const char *suffix)
{
unsigned i, j;
const char *sep = "";
printf("%s", prefix);
for (i = 0; i < format_desc->block.height; ++i) {
for (j = 0; j < format_desc->block.width; ++j) {
printf("%s%f", sep, unpacked[i][j]);
sep = ", ";
}
sep = ",\n";
}
printf("%s", suffix);
}
static void
print_unpacked_z_32unorm(const struct util_format_description *format_desc,
const char *prefix,
uint32_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH],
const char *suffix)
{
unsigned i, j;
const char *sep = "";
printf("%s", prefix);
for (i = 0; i < format_desc->block.height; ++i) {
for (j = 0; j < format_desc->block.width; ++j) {
printf("%s0x%08x", sep, unpacked[i][j]);
sep = ", ";
}
}
printf("%s", suffix);
}
static void
print_unpacked_s_8uscaled(const struct util_format_description *format_desc,
const char *prefix,
uint8_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH],
const char *suffix)
{
unsigned i, j;
const char *sep = "";
printf("%s", prefix);
for (i = 0; i < format_desc->block.height; ++i) {
for (j = 0; j < format_desc->block.width; ++j) {
printf("%s0x%02x", sep, unpacked[i][j]);
sep = ", ";
}
}
printf("%s", suffix);
}
static boolean
test_format_fetch_float(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
test_format_fetch_rgba_float(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
float unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4] = { { { 0 } } };
unsigned i, j, k;
......@@ -143,7 +204,7 @@ test_format_fetch_float(const struct util_format_description *format_desc,
success = TRUE;
for (i = 0; i < format_desc->block.height; ++i) {
for (j = 0; j < format_desc->block.width; ++j) {
format_desc->fetch_float(unpacked[i][j], test->packed, j, i);
format_desc->fetch_rgba_float(unpacked[i][j], test->packed, j, i);
for (k = 0; k < 4; ++k) {
if (!compare_float(test->unpacked[i][j][k], unpacked[i][j][k])) {
success = FALSE;
......@@ -153,8 +214,8 @@ test_format_fetch_float(const struct util_format_description *format_desc,
}
if (!success) {
print_unpacked_float(format_desc, "FAILED: ", unpacked, " obtained\n");
print_unpacked_doubl(format_desc, " ", test->unpacked, " expected\n");
print_unpacked_rgba_float(format_desc, "FAILED: ", unpacked, " obtained\n");
print_unpacked_rgba_doubl(format_desc, " ", test->unpacked, " expected\n");
}
return success;
......@@ -162,14 +223,14 @@ test_format_fetch_float(const struct util_format_description *format_desc,
static boolean
test_format_unpack_float(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
test_format_unpack_rgba_float(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
float unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4] = { { { 0 } } };
unsigned i, j, k;
boolean success;
format_desc->unpack_float(&unpacked[0][0][0], sizeof unpacked[0],
format_desc->unpack_rgba_float(&unpacked[0][0][0], sizeof unpacked[0],
test->packed, 0,
format_desc->block.width, format_desc->block.height);
......@@ -185,8 +246,8 @@ test_format_unpack_float(const struct util_format_description *format_desc,
}
if (!success) {
print_unpacked_float(format_desc, "FAILED: ", unpacked, " obtained\n");
print_unpacked_doubl(format_desc, " ", test->unpacked, " expected\n");
print_unpacked_rgba_float(format_desc, "FAILED: ", unpacked, " obtained\n");
print_unpacked_rgba_doubl(format_desc, " ", test->unpacked, " expected\n");
}
return success;
......@@ -194,9 +255,8 @@ test_format_unpack_float(const struct util_format_description *format_desc,
static boolean
test_format_pack_float(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
test_format_pack_rgba_float(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
float unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4];
uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
......@@ -221,7 +281,7 @@ test_format_pack_float(const struct util_format_description *format_desc,
}
}
format_desc->pack_float(packed, 0,
format_desc->pack_rgba_float(packed, 0,
&unpacked[0][0][0], sizeof unpacked[0],
format_desc->block.width, format_desc->block.height);
......@@ -264,15 +324,15 @@ convert_float_to_8unorm(uint8_t *dst, const double *src)
static boolean
test_format_unpack_8unorm(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
test_format_unpack_rgba_8unorm(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
uint8_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4] = { { { 0 } } };
uint8_t expected[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4] = { { { 0 } } };
unsigned i, j, k;
boolean success;
format_desc->unpack_8unorm(&unpacked[0][0][0], sizeof unpacked[0],
format_desc->unpack_rgba_8unorm(&unpacked[0][0][0], sizeof unpacked[0],
test->packed, 0,
format_desc->block.width, format_desc->block.height);
......@@ -290,8 +350,8 @@ test_format_unpack_8unorm(const struct util_format_description *format_desc,
}
if (!success) {
print_unpacked_8unorm(format_desc, "FAILED: ", unpacked, " obtained\n");
print_unpacked_8unorm(format_desc, " ", expected, " expected\n");
print_unpacked_rgba_8unorm(format_desc, "FAILED: ", unpacked, " obtained\n");
print_unpacked_rgba_8unorm(format_desc, " ", expected, " expected\n");
}
return success;
......@@ -299,8 +359,8 @@ test_format_unpack_8unorm(const struct util_format_description *format_desc,
static boolean
test_format_pack_8unorm(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
test_format_pack_rgba_8unorm(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
uint8_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4];
uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
......@@ -325,7 +385,7 @@ test_format_pack_8unorm(const struct util_format_description *format_desc,
memset(packed, 0, sizeof packed);
format_desc->pack_8unorm(packed, 0,
format_desc->pack_rgba_8unorm(packed, 0,
&unpacked[0][0][0], sizeof unpacked[0],
format_desc->block.width, format_desc->block.height);
......@@ -343,37 +403,243 @@ test_format_pack_8unorm(const struct util_format_description *format_desc,
}
static boolean
test_format_unpack_z_float(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
float unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH] = { { 0 } };
unsigned i, j;
boolean success;
format_desc->unpack_z_float(&unpacked[0][0], sizeof unpacked[0],
test->packed, 0,
format_desc->block.width, format_desc->block.height);
success = TRUE;
for (i = 0; i < format_desc->block.height; ++i) {
for (j = 0; j < format_desc->block.width; ++j) {
if (!compare_float(test->unpacked[i][j][0], unpacked[i][j])) {
success = FALSE;
}
}
}
if (!success) {
print_unpacked_z_float(format_desc, "FAILED: ", unpacked, " obtained\n");
print_unpacked_rgba_doubl(format_desc, " ", test->unpacked, " expected\n");
}
return success;
}
static boolean
test_format_pack_z_float(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
float unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH];
uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
unsigned i, j;
boolean success;
memset(packed, 0, sizeof packed);
for (i = 0; i < format_desc->block.height; ++i) {
for (j = 0; j < format_desc->block.width; ++j) {
unpacked[i][j] = (float) test->unpacked[i][j][0];
if (test->unpacked[i][j][1]) {
return TRUE;
}
}
}
format_desc->pack_z_float(packed, 0,
&unpacked[0][0], sizeof unpacked[0],
format_desc->block.width, format_desc->block.height);
success = TRUE;
for (i = 0; i < format_desc->block.bits/8; ++i)
if ((test->packed[i] & test->mask[i]) != (packed[i] & test->mask[i]))
success = FALSE;
if (!success) {
print_packed(format_desc, "FAILED: ", packed, " obtained\n");
print_packed(format_desc, " ", test->packed, " expected\n");
}
return success;
}
static boolean
test_format_unpack_z_32unorm(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
uint32_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH] = { { 0 } };
uint32_t expected[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH] = { { 0 } };
unsigned i, j;
boolean success;
format_desc->unpack_z_32unorm(&unpacked[0][0], sizeof unpacked[0],
test->packed, 0,
format_desc->block.width, format_desc->block.height);
for (i = 0; i < format_desc->block.height; ++i) {
for (j = 0; j < format_desc->block.width; ++j) {
expected[i][j] = test->unpacked[i][j][0] * 0xffffffff;
}
}
success = TRUE;
for (i = 0; i < format_desc->block.height; ++i) {
for (j = 0; j < format_desc->block.width; ++j) {
if (expected[i][j] != unpacked[i][j]) {
success = FALSE;
}
}
}
if (!success) {
print_unpacked_z_32unorm(format_desc, "FAILED: ", unpacked, " obtained\n");
print_unpacked_z_32unorm(format_desc, " ", expected, " expected\n");
}
return success;
}
static boolean
test_format_pack_z_32unorm(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
uint32_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH];
uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
unsigned i, j;
boolean success;
for (i = 0; i < format_desc->block.height; ++i) {
for (j = 0; j < format_desc->block.width; ++j) {
unpacked[i][j] = test->unpacked[i][j][0] * 0xffffffff;
if (test->unpacked[i][j][1]) {
return TRUE;
}
}
}
memset(packed, 0, sizeof packed);
format_desc->pack_z_32unorm(packed, 0,
&unpacked[0][0], sizeof unpacked[0],
format_desc->block.width, format_desc->block.height);
success = TRUE;
for (i = 0; i < format_desc->block.bits/8; ++i)
if ((test->packed[i] & test->mask[i]) != (packed[i] & test->mask[i]))
success = FALSE;
if (!success) {
print_packed(format_desc, "FAILED: ", packed, " obtained\n");
print_packed(format_desc, " ", test->packed, " expected\n");
}
return success;
}
static boolean
test_format_unpack_s_8uscaled(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
uint8_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH] = { { 0 } };
uint8_t expected[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH] = { { 0 } };
unsigned i, j;
boolean success;
format_desc->unpack_s_8uscaled(&unpacked[0][0], sizeof unpacked[0],
test->packed, 0,
format_desc->block.width, format_desc->block.height);
for (i = 0; i < format_desc->block.height; ++i) {
for (j = 0; j < format_desc->block.width; ++j) {
expected[i][j] = test->unpacked[i][j][1];
}
}
success = TRUE;
for (i = 0; i < format_desc->block.height; ++i) {
for (j = 0; j < format_desc->block.width; ++j) {
if (expected[i][j] != unpacked[i][j]) {
success = FALSE;
}
}
}
if (!success) {
print_unpacked_s_8uscaled(format_desc, "FAILED: ", unpacked, " obtained\n");
print_unpacked_s_8uscaled(format_desc, " ", expected, " expected\n");
}
return success;
}
static boolean
test_format_pack_s_8uscaled(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
uint8_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH];
uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
unsigned i, j;
boolean success;
for (i = 0; i < format_desc->block.height; ++i) {
for (j = 0; j < format_desc->block.width; ++j) {
unpacked[i][j] = test->unpacked[i][j][1];
if (test->unpacked[i][j][0]) {
return TRUE;
}
}
}
memset(packed, 0, sizeof packed);
format_desc->pack_s_8uscaled(packed, 0,
&unpacked[0][0], sizeof unpacked[0],
format_desc->block.width, format_desc->block.height);
success = TRUE;
for (i = 0; i < format_desc->block.bits/8; ++i)
if ((test->packed[i] & test->mask[i]) != (packed[i] & test->mask[i]))
success = FALSE;
if (!success) {
print_packed(format_desc, "FAILED: ", packed, " obtained\n");
print_packed(format_desc, " ", test->packed, " expected\n");
}
return success;
}
typedef boolean
(*test_func_t)(const struct util_format_description *format_desc,
const struct util_format_test_case *test);
static boolean
test_one(test_func_t func, const char *suffix)
test_one_func(const struct util_format_description *format_desc,
test_func_t func,
const char *suffix)
{
enum pipe_format last_format = PIPE_FORMAT_NONE;
unsigned i;
bool success = TRUE;
printf("Testing util_format_%s_%s ...\n",
format_desc->short_name, suffix);
for (i = 0; i < util_format_nr_test_cases; ++i) {
const struct util_format_test_case *test = &util_format_test_cases[i];
const struct util_format_description *format_desc;
bool skip = FALSE;
format_desc = util_format_description(test->format);
if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC &&
!util_format_s3tc_enabled) {
skip = TRUE;
}
if (test->format != last_format) {
printf("%s util_format_%s_%s ...\n",
skip ? "Skipping" : "Testing", format_desc->short_name, suffix);
last_format = test->format;
}
if (!skip) {
if (test->format == format_desc->format) {
if (!func(format_desc, &util_format_test_cases[i])) {
success = FALSE;
}
......@@ -387,22 +653,44 @@ test_one(test_func_t func, const char *suffix)
static boolean
test_all(void)
{
enum pipe_format format;
bool success = TRUE;
if (!test_one(&test_format_fetch_float, "fetch_float"))
success = FALSE;
for (format = 1; format < PIPE_FORMAT_COUNT; ++format) {
const struct util_format_description *format_desc;
if (!test_one(&test_format_pack_float, "pack_float"))
success = FALSE;
format_desc = util_format_description(format);
if (!format_desc) {
continue;
}
if (!test_one(&test_format_unpack_float, "unpack_float"))
success = FALSE;
if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC &&
!util_format_s3tc_enabled) {
continue;
}
# define TEST_ONE_FUNC(name) \
if (format_desc->name) { \
if (!test_one_func(format_desc, &test_format_##name, #name)) { \
success = FALSE; \
} \
}
TEST_ONE_FUNC(fetch_rgba_float);
TEST_ONE_FUNC(pack_rgba_float);
TEST_ONE_FUNC(unpack_rgba_float);
TEST_ONE_FUNC(pack_rgba_8unorm);
TEST_ONE_FUNC(unpack_rgba_8unorm);
if (