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/ilo | |
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/ilo')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_state.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state.c b/src/gallium/drivers/ilo/ilo_state.c index 4f1002eefe8..7693133a1bf 100644 --- a/src/gallium/drivers/ilo/ilo_state.c +++ b/src/gallium/drivers/ilo/ilo_state.c @@ -2015,9 +2015,8 @@ ilo_create_sampler_view(struct pipe_context *pipe, memset(&info, 0, sizeof(info)); info.vma = ilo_resource_get_vma(res); - info.offset = templ->u.buf.first_element * info.struct_size; - info.size = (templ->u.buf.last_element - - templ->u.buf.first_element + 1) * info.struct_size; + info.offset = templ->u.buf.offset; + info.size = templ->u.buf.size; info.access = ILO_STATE_SURFACE_ACCESS_SAMPLER; info.format = ilo_format_translate_color(dev, templ->format); info.format_size = util_format_get_blocksize(templ->format); |