diff options
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_blitter.c | 9 | ||||
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_transfer.c | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c index db0d1b894..20fbd80d5 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.c +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c @@ -383,6 +383,15 @@ void util_blitter_destroy(struct blitter_context *blitter) if (ctx->fs_texfetch_stencil[i]) ctx->delete_fs_state(pipe, ctx->fs_texfetch_stencil[i]); + if (ctx->fs_texfetch_col_msaa[i]) + ctx->delete_fs_state(pipe, ctx->fs_texfetch_col_msaa[i]); + if (ctx->fs_texfetch_depth_msaa[i]) + ctx->delete_fs_state(pipe, ctx->fs_texfetch_depth_msaa[i]); + if (ctx->fs_texfetch_depthstencil_msaa[i]) + ctx->delete_fs_state(pipe, ctx->fs_texfetch_depthstencil_msaa[i]); + if (ctx->fs_texfetch_stencil_msaa[i]) + ctx->delete_fs_state(pipe, ctx->fs_texfetch_stencil_msaa[i]); + for (j = 0; j< Elements(ctx->fs_resolve[i]); j++) for (f = 0; f < 2; f++) if (ctx->fs_resolve[i][j][f]) diff --git a/mesalib/src/gallium/auxiliary/util/u_transfer.c b/mesalib/src/gallium/auxiliary/util/u_transfer.c index 7804f2a82..71da35d6d 100644 --- a/mesalib/src/gallium/auxiliary/util/u_transfer.c +++ b/mesalib/src/gallium/auxiliary/util/u_transfer.c @@ -25,8 +25,8 @@ void u_default_transfer_inline_write( struct pipe_context *pipe, usage |= PIPE_TRANSFER_WRITE; /* transfer_inline_write implicitly discards the rewritten buffer range */ - /* XXX this looks very broken for non-buffer resources having more than one dim. */ - if (box->x == 0 && box->width == resource->width0) { + if (resource->target == PIPE_BUFFER && + box->x == 0 && box->width == resource->width0) { usage |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE; } else { usage |= PIPE_TRANSFER_DISCARD_RANGE; |