diff options
author | Marek Olšák <[email protected]> | 2016-08-12 02:33:41 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-08-17 14:15:33 +0200 |
commit | 7cd256ce7e4bad680bb77d033cf5dd662abab2dd (patch) | |
tree | 3b4a190876c076129e01792f0e3f4a087a820988 /src/gallium/drivers/r600/r600_state.c | |
parent | 1ac23a9359556091b12ed1345737084e3a2f6ae3 (diff) |
gallium: change pipe_sampler_view::first_element/last_element -> offset/size
This is required by OpenGL. Our hardware supports this.
Example: Bind RGBA32F with offset = 4 bytes.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97305
Acked-by: Ilia Mirkin <[email protected]>
Acked-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_state.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 046573f5170..62b1c2c282a 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -631,8 +631,8 @@ texture_buffer_sampler_view(struct r600_pipe_sampler_view *view, struct r600_texture *tmp = (struct r600_texture*)view->base.texture; int stride = util_format_get_blocksize(view->base.format); unsigned format, num_format, format_comp, endian; - uint64_t offset = view->base.u.buf.first_element * stride; - unsigned size = (view->base.u.buf.last_element - view->base.u.buf.first_element + 1) * stride; + uint64_t offset = view->base.u.buf.offset; + unsigned size = view->base.u.buf.size; r600_vertex_data_type(view->base.format, &format, &num_format, &format_comp, |