diff options
author | Jason Ekstrand <[email protected]> | 2016-06-09 18:48:07 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-06-22 12:26:43 -0700 |
commit | 4061fde66e9feefa051a02fe258d69fe817e6a8c (patch) | |
tree | 8e076123948d19d256d05524b4ab59d888782721 /src/intel/isl/isl_surface_state.c | |
parent | ce24097abe1427463ac300a686e4c36ea07464fc (diff) |
isl/state: Add assertions for buffer surface restrictions
Acked-by: Chad Versace <[email protected]>
Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/intel/isl/isl_surface_state.c')
-rw-r--r-- | src/intel/isl/isl_surface_state.c | 11 |
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, |