diff options
author | Kenneth Graunke <[email protected]> | 2017-01-22 01:44:08 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-01-26 01:43:20 -0800 |
commit | f8f7ea508be7fe7222cd19e0d59574cfea2decf0 (patch) | |
tree | 555d53e215f7779fae4822b20995b1a1a07fbcb1 /src/mesa/drivers/dri/i965/intel_blit.h | |
parent | fcf723b647f36fa174d29b1fe6a9732637a1f8d1 (diff) |
i965: Make intelEmitCopyBlit not truncate large strides.
When trying to blit larger tiled surfaces, the pitch can be larger than
32768 bytes, which means it won't fit in a GLshort. Passing it in will
truncate the stride to 0, which has...surprising results.
The pitch can be up to 32,768 DWords, or 128kB. We measure it in bytes,
but divide by 4 when programming it. So we need to handle values up to
131,072. Switch from GLshort to int32_t to avoid the truncation.
Fixes GL45-CTS.gtf30.GL3Tests.depth_texture.depth_texture_copyteximage
at widths greater than 8192.
v2: Use int32_t as negative values can be used (Jason).
Cc: "17.0" <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_blit.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_blit.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_blit.h b/src/mesa/drivers/dri/i965/intel_blit.h index 6925795656a..7cb2c7e0b27 100644 --- a/src/mesa/drivers/dri/i965/intel_blit.h +++ b/src/mesa/drivers/dri/i965/intel_blit.h @@ -31,12 +31,12 @@ bool intelEmitCopyBlit(struct brw_context *brw, GLuint cpp, - GLshort src_pitch, + int32_t src_pitch, drm_intel_bo *src_buffer, GLuint src_offset, uint32_t src_tiling, uint32_t src_tr_mode, - GLshort dst_pitch, + int32_t dst_pitch, drm_intel_bo *dst_buffer, GLuint dst_offset, uint32_t dst_tiling, |