diff options
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_texture.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c index 0fb2ee1181f..3466a0dd68b 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c @@ -206,8 +206,7 @@ emit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring, &dummy_view; struct fd_resource *rsc = fd_resource(view->base.texture); if (rsc && rsc->base.b.target == PIPE_BUFFER) { - OUT_RELOC(ring, rsc->bo, view->base.u.buf.first_element * - util_format_get_blocksize(view->base.format), 0, 0); + OUT_RELOC(ring, rsc->bo, view->base.u.buf.offset, 0, 0); j = 1; } else { unsigned start = fd_sampler_first_level(&view->base); diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c index 81336bff97f..ea2d34177a2 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c @@ -241,8 +241,7 @@ fd3_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, lvl = 0; so->texconst1 = A3XX_TEX_CONST_1_FETCHSIZE(fd3_pipe2fetchsize(cso->format)) | - A3XX_TEX_CONST_1_WIDTH(cso->u.buf.last_element - - cso->u.buf.first_element + 1) | + A3XX_TEX_CONST_1_WIDTH(cso->u.buf.size / util_format_get_blocksize(cso->format)) | A3XX_TEX_CONST_1_HEIGHT(1); } else { unsigned miplevels; |