diff options
author | Anuj Phogat <[email protected]> | 2000-12-31 16:05:42 -0800 |
---|---|---|
committer | Anuj Phogat <[email protected]> | 2015-02-25 14:10:47 -0800 |
commit | 0a4ea87344a1cbca4c50cfca1efe97202aa18be8 (patch) | |
tree | b507d8d4383d1df5551bfb8552ff7457e03b5493 /src/mesa/drivers | |
parent | cb25087c7bd5f1ad2515647278b32d3f07803f77 (diff) |
meta: Do power of two samples check only for samples > 0
otherwise samples=0 passes the check, which is invalid.
Signed-off-by: Anuj Phogat <[email protected]>
Reviewed-by: Neil Roberts <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/common/meta_blit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c index 3406be1ed1c..971a2ff1deb 100644 --- a/src/mesa/drivers/common/meta_blit.c +++ b/src/mesa/drivers/common/meta_blit.c @@ -82,7 +82,7 @@ setup_glsl_msaa_blit_scaled_shader(struct gl_context *ctx, y_scale = samples * 0.5; /* We expect only power of 2 samples in source multisample buffer. */ - assert((samples & (samples - 1)) == 0); + assert(samples > 0 && (samples & (samples - 1)) == 0); while (samples >> (shader_offset + 1)) { shader_offset++; } @@ -261,7 +261,7 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx, } /* We expect only power of 2 samples in source multisample buffer. */ - assert((samples & (samples - 1)) == 0); + assert(samples > 0 && (samples & (samples - 1)) == 0); while (samples >> (shader_offset + 1)) { shader_offset++; } |