aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_pbo.h
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-11-07 18:12:08 +0100
committerNicolai Hähnle <[email protected]>2016-11-16 10:31:31 +0100
commit7cdf292dc3a83ff8d6cb26fc15a679d6d2cdc25b (patch)
tree8d36003b86e92707cc45409e7408b44dec599ef3 /src/mesa/state_tracker/st_pbo.h
parent5e10a3d6e5c26ecfb536707165f4baf3b27a7623 (diff)
st/mesa: fix SINT <-> UINT conversion during PBO upload / download
This fixes use cases like glReadPixels from an RGBA8I framebuffer into a PBO with type GL_INT by clamping values appropriately when they fall outside the range of the destination format. Fixes parts of GL45-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels_pbo. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_pbo.h')
-rw-r--r--src/mesa/state_tracker/st_pbo.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_pbo.h b/src/mesa/state_tracker/st_pbo.h
index 6513093002d..54ae7768b4f 100644
--- a/src/mesa/state_tracker/st_pbo.h
+++ b/src/mesa/state_tracker/st_pbo.h
@@ -85,10 +85,14 @@ void *
st_pbo_create_gs(struct st_context *st);
void *
-st_pbo_get_upload_fs(struct st_context *st);
+st_pbo_get_upload_fs(struct st_context *st,
+ enum pipe_format src_format,
+ enum pipe_format dst_format);
void *
-st_pbo_get_download_fs(struct st_context *st, enum pipe_texture_target target);
+st_pbo_get_download_fs(struct st_context *st, enum pipe_texture_target target,
+ enum pipe_format src_format,
+ enum pipe_format dst_format);
extern void
st_init_pbo_helpers(struct st_context *st);