mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
ilo: add array_size and level_count to ilo_image
We will use them for bound checking.
This commit is contained in:
parent
f9d2bbe967
commit
f0de65cbc2
2 changed files with 6 additions and 0 deletions
|
|
@ -679,6 +679,8 @@ img_init_size_and_format(struct ilo_image *img,
|
||||||
img->width0 = templ->width0;
|
img->width0 = templ->width0;
|
||||||
img->height0 = templ->height0;
|
img->height0 = templ->height0;
|
||||||
img->depth0 = templ->depth0;
|
img->depth0 = templ->depth0;
|
||||||
|
img->array_size = templ->array_size;
|
||||||
|
img->level_count = templ->last_level + 1;
|
||||||
img->sample_count = (templ->nr_samples) ? templ->nr_samples : 1;
|
img->sample_count = (templ->nr_samples) ? templ->nr_samples : 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1348,6 +1350,8 @@ img_init_for_transfer(struct ilo_image *img,
|
||||||
img->width0 = templ->width0;
|
img->width0 = templ->width0;
|
||||||
img->height0 = templ->height0;
|
img->height0 = templ->height0;
|
||||||
img->depth0 = templ->depth0;
|
img->depth0 = templ->depth0;
|
||||||
|
img->array_size = templ->array_size;
|
||||||
|
img->level_count = 1;
|
||||||
img->sample_count = 1;
|
img->sample_count = 1;
|
||||||
|
|
||||||
img->format = templ->format;
|
img->format = templ->format;
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,8 @@ struct ilo_image {
|
||||||
unsigned width0;
|
unsigned width0;
|
||||||
unsigned height0;
|
unsigned height0;
|
||||||
unsigned depth0;
|
unsigned depth0;
|
||||||
|
unsigned array_size;
|
||||||
|
unsigned level_count;
|
||||||
unsigned sample_count;
|
unsigned sample_count;
|
||||||
enum pipe_format format;
|
enum pipe_format format;
|
||||||
bool separate_stencil;
|
bool separate_stencil;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue