On Wed, Sep 16, 2015 at 9:21 AM, Roland Scheidegger <[email protected]> wrote: > Since there are no formats where block.bits isn't a multiple of 8 (and I > wouldn't expect that to change), you could theoretically fix that by > dividing by block.bits / 8 instead of multiplying base (or size) by 8. > Ought to be faster at least on 32bit systems...
Why didn't I think of that... I even tried playing with a few other expression orderings, and gave up. > Unless you wanted to support >= 4GB buffers (I think though for that > we're missing way more things). No. In fact my piglit test explicitly skips situations that would cause it to create >= 2G buffers. > Either way though, > Reviewed-by: Roland Scheidegger <[email protected]> Thanks! > > Am 16.09.2015 um 01:32 schrieb Ilia Mirkin: >> This fixes failures with the newly-submitted max-size texture buffer >> piglit test for GPUs exposing >= 128M max texels. >> >> Signed-off-by: Ilia Mirkin <[email protected]> >> Cc: "10.6 11.0" <[email protected]> >> --- >> src/mesa/state_tracker/st_atom_texture.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/mesa/state_tracker/st_atom_texture.c >> b/src/mesa/state_tracker/st_atom_texture.c >> index 31e0f6b..62312af 100644 >> --- a/src/mesa/state_tracker/st_atom_texture.c >> +++ b/src/mesa/state_tracker/st_atom_texture.c >> @@ -264,7 +264,7 @@ st_create_texture_sampler_view_from_stobj(struct >> pipe_context *pipe, >> format); >> >> if (stObj->pt->target == PIPE_BUFFER) { >> - unsigned base, size; >> + uint64_t base, size; >> unsigned f, n; >> const struct util_format_description *desc >> = util_format_description(templ.format); >> > _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
