summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/isl/isl_surface_state.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index 15b2fa9cadc..ca5061225f4 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -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,