mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
isl/state: Add assertions for buffer surface restrictions
Acked-by: Chad Versace <chad.versace@intel.com> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
ce24097abe
commit
4061fde66e
1 changed files with 11 additions and 0 deletions
|
|
@ -435,6 +435,17 @@ isl_genX(buffer_fill_state_s)(void *state,
|
|||
{
|
||||
uint32_t num_elements = info->size / info->stride;
|
||||
|
||||
if (GEN_GEN >= 7) {
|
||||
if (info->format == ISL_FORMAT_RAW) {
|
||||
assert(num_elements <= (1ull << 31));
|
||||
assert((num_elements & 3) == 0);
|
||||
} else {
|
||||
assert(num_elements <= (1ull << 27));
|
||||
}
|
||||
} else {
|
||||
assert(num_elements <= (1ull << 27));
|
||||
}
|
||||
|
||||
struct GENX(RENDER_SURFACE_STATE) surface_state = {
|
||||
.SurfaceType = SURFTYPE_BUFFER,
|
||||
.SurfaceArray = false,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue