mesa/src
Kenneth Graunke f06c86358c intel/blorp: Handle SINT/UINT clamping on blits.
This patch makes blorp_blit handle SINT<->UINT blit value clamping.
After reading the source's integer data (which is expanded to 32-bit),
we either IMAX with 0 (for SINT -> UINT, to clamp negative numbers) or
UMIN with (1 << 31) - 1 (for UINT -> SINT, to clamp positive numbers
outside of the representable range).

Such blits are not allowed by the OpenGL or Vulkan APIs directly:

   The Vulkan 1.1 spec for vkCmdBlitImage says:

   "Integer formats can only be converted to other integer formats with
    the same signedness."

   The GL 4.5 spec for glBlitFramebuffer says:

   "An INVALID_OPERATION error is generated if format conversions are
    not supported, which occurs under any of the following conditions:
    [...]
    * The read buffer contains unsigned integer values and any draw
      buffer does not contain unsigned integer values.
    * The read buffer contains signed integer values and any draw buffer
      does not contain signed integer values."

However, they are useful for other operations, such as texture upload
and download, which typically are implemented via blorp_blit().  i965
has code to fall back in this case (which the next commit will delete),
and Gallium expects blit() to handle this case for texture upload.

Fixes the following tests on iris:
- GTF-GL46.gtf32.GL3Tests.packed_pixels.packed_pixels
- GTF-GL46.gtf32.GL3Tests.packed_pixels.packed_pixels_pbo
- GTF-GL46.gtf32.GL3Tests.packed_pixels.packed_pixels_pixelstore

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-06-05 16:58:07 -07:00
..
amd radv: use only one descriptor in the fmask expand pass 2019-06-05 20:50:58 +02:00
broadcom v3d: Enable NIR's lower_fmod option. 2019-06-05 16:45:12 -07:00
compiler nir: Combine lower_fmod16/32 back into a single lower_fmod. 2019-06-05 16:45:12 -07:00
egl egl: add EGL_platform_device support 2019-06-05 13:35:21 -04:00
etnaviv etnaviv: etnaviv_bo_cache_test: Use /dev/dri/renderD128 by default 2019-06-05 08:58:05 +00:00
freedreno nir: Combine lower_fmod16/32 back into a single lower_fmod. 2019-06-05 16:45:12 -07:00
gallium radeonsi: Enable NIR's lower_fmod option. 2019-06-05 16:45:12 -07:00
gbm gbm: gbm_bo_get_handle_for_plane fallback to nonplanar handle 2019-05-15 18:27:30 +01:00
getopt
glx glx: Fix error message when no driverName is available 2019-06-04 15:28:12 -07:00
gtest delete autotools .gitignore files 2019-04-29 21:17:19 +00:00
hgl haiku: Fix hgl dispatch build. Tested under meson/scons. 2019-04-02 16:06:00 -05:00
imgui imgui: delete demo file 2019-05-21 14:40:22 +01:00
intel intel/blorp: Handle SINT/UINT clamping on blits. 2019-06-05 16:58:07 -07:00
loader Delete autotools 2019-04-15 13:44:29 -07:00
mapi mesa: EXT_dsa add selectorless matrix stack functions 2019-06-03 15:28:51 -04:00
mesa st/nir: Don't use GLSL IR's MOD_TO_FLOOR lowering when using NIR. 2019-06-05 16:45:12 -07:00
util util/hash_table: Use fast modulo computation 2019-05-31 19:14:35 +02:00
vulkan vulkan: Update the XML and headers to 1.1.110 2019-06-04 17:30:51 +00:00
meson.build build: Build etnaviv drm 2019-06-05 08:58:05 +00:00
SConscript scons: Remove gles option. 2018-10-19 16:50:26 +01:00