diff options
Diffstat (limited to 'src/gallium/drivers/r300/r300_texture.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_texture.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index 34860c9d72b..fa09410c6a5 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -812,9 +812,9 @@ static void r300_texture_setup_fb_state(struct r300_surface *surf) } } -boolean r300_resource_set_properties(struct pipe_screen *screen, - struct pipe_resource *tex, - const struct pipe_resource *new_properties) +void r300_resource_set_properties(struct pipe_screen *screen, + struct pipe_resource *tex, + const struct pipe_resource *new_properties) { struct r300_screen *rscreen = r300_screen(screen); struct r300_resource *res = r300_resource(tex); @@ -824,13 +824,8 @@ boolean r300_resource_set_properties(struct pipe_screen *screen, util_format_short_name(tex->format), util_format_short_name(new_properties->format)); - if (!r300_texture_desc_init(rscreen, res, new_properties)) { - fprintf(stderr, "r300: ERROR: Cannot set texture properties.\n"); - return FALSE; - } + r300_texture_desc_init(rscreen, res, new_properties); r300_texture_setup_format_state(rscreen, res, 0, &res->tx_format); - - return TRUE; } static void r300_texture_destroy(struct pipe_screen *screen, @@ -897,12 +892,7 @@ r300_texture_create_object(struct r300_screen *rscreen, tex->tex.stride_in_bytes_override = stride_in_bytes_override; tex->buf = buffer; - if (!r300_resource_set_properties(&rscreen->screen, &tex->b.b.b, base)) { - if (buffer) - pb_reference(&buffer, NULL); - FREE(tex); - return NULL; - } + r300_resource_set_properties(&rscreen->screen, &tex->b.b.b, base); /* Create the backing buffer if needed. */ if (!tex->buf) { |