mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
isl: Fix assert on raw buffer surface state size
See inline PRM reference.
Cc: 12.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 028f6d8317)
This commit is contained in:
parent
30c6bff143
commit
f334b6deaa
1 changed files with 8 additions and 1 deletions
|
|
@ -430,8 +430,15 @@ isl_genX(buffer_fill_state_s)(void *state,
|
|||
uint32_t num_elements = info->size / info->stride;
|
||||
|
||||
if (GEN_GEN >= 7) {
|
||||
/* From the IVB PRM, SURFACE_STATE::Height,
|
||||
*
|
||||
* For typed buffer and structured buffer surfaces, the number
|
||||
* of entries in the buffer ranges from 1 to 2^27. For raw buffer
|
||||
* surfaces, the number of entries in the buffer is the number of bytes
|
||||
* which can range from 1 to 2^30.
|
||||
*/
|
||||
if (info->format == ISL_FORMAT_RAW) {
|
||||
assert(num_elements <= (1ull << 31));
|
||||
assert(num_elements <= (1ull << 30));
|
||||
assert((num_elements & 3) == 0);
|
||||
} else {
|
||||
assert(num_elements <= (1ull << 27));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue