summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/galahad/glhd_context.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2012-07-06 20:12:56 +0100
committerJosé Fonseca <[email protected]>2012-07-06 20:12:56 +0100
commitf8e13e6d699b7251994cb367bf0609c54dccd87d (patch)
treea2409e2ae4bee33207a8a7378b3d950d6ac383d7 /src/gallium/drivers/galahad/glhd_context.c
parent7bd926af8935f66e3a0e5c7d662c4ea6f30a54c6 (diff)
galahad: Fix zealous warnings.
Diffstat (limited to 'src/gallium/drivers/galahad/glhd_context.c')
-rw-r--r--src/gallium/drivers/galahad/glhd_context.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index fe8fc81f01f..01ab92341a0 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -635,15 +635,14 @@ galahad_context_set_index_buffer(struct pipe_context *_pipe,
struct pipe_index_buffer unwrapped_ib, *ib = NULL;
if (_ib) {
- if (_ib->buffer) {
+ if (_ib->buffer || _ib->user_buffer) {
switch (_ib->index_size) {
case 1:
case 2:
case 4:
break;
default:
- glhd_warn("index buffer %p has unrecognized index size %d",
- (void *) _ib->buffer, _ib->index_size);
+ glhd_warn("unrecognized index size %d", _ib->index_size);
break;
}
}
@@ -679,9 +678,14 @@ galahad_context_resource_copy_region(struct pipe_context *_pipe,
struct pipe_resource *src = glhd_resource_src->resource;
if (_dst->format != _src->format) {
- glhd_warn("Format mismatch: Source is %s, destination is %s",
- util_format_short_name(_src->format),
- util_format_short_name(_dst->format));
+ const struct util_format_description *src_desc =
+ util_format_description(_src->format);
+ const struct util_format_description *dst_desc =
+ util_format_description(_dst->format);
+ if (!util_is_format_compatible(src_desc, dst_desc))
+ glhd_warn("Format mismatch: Source is %s, destination is %s",
+ src_desc->short_name,
+ dst_desc->short_name);
}
if ((_src->target == PIPE_BUFFER && _dst->target != PIPE_BUFFER) ||