From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> gen8/9 has some compile time asserts to verify the SAMPLER_OFFSET() bits don't exceed their quota of the flags. Add similar asserts for gen6/7. Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> --- src/sna/gen6_render.c | 1 + src/sna/gen7_render.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 0a53ef562540..1558750325f0 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -3725,6 +3725,7 @@ static bool gen6_render_setup(struct sna *sna, int devid) } } + COMPILE_TIME_ASSERT(SAMPLER_OFFSET(FILTER_COUNT, EXTEND_COUNT, FILTER_COUNT, EXTEND_COUNT) <= 0xfff); ss = sna_static_stream_map(&general, 2 * sizeof(*ss) * (2 + diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 0a3bda768100..671f60e07679 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -3958,6 +3958,7 @@ static bool gen7_render_setup(struct sna *sna, int devid) assert(state->wm_kernel[m][0]|state->wm_kernel[m][1]|state->wm_kernel[m][2]); } + COMPILE_TIME_ASSERT(SAMPLER_OFFSET(FILTER_COUNT, EXTEND_COUNT, FILTER_COUNT, EXTEND_COUNT) <= 0xfff); ss = sna_static_stream_map(&general, 2 * sizeof(*ss) * (2 + -- 2.16.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx