mesa/src/panfrost
Jessica Clarke 750325730b panfrost/blend: Fix invalid const values leading to NIR validation errors
Using a designated initializer like this leaves padding bits, which form
part of the aliasing u64/f64 member of the union, uninitialised, but a
nir_const_value must always have the unused bits zeroed out. Thus, use
the nir_const_value_for_float helper instead like everywhere else which
will do a memset 0 for us first.

Without this, using the pan_blend shader in a build with validation
enabled fails with:

  NIR validation failed after nir_lower_vars_to_ssa
  ...
            vec4 32 ssa_58 = load_const (0x3f7cfcfd /* 0.988235 */, 0x3f7cfcfd /* 0.988235 */, 0x3f7cfcfd /* 0.988235 */, 0x3f800000 /* 1.000000 */)
  error: memcmp(val, &cmp_val, sizeof(cmp_val)) == 0 (../src/compiler/nir/nir_validate.c:976)

Fixes: 1378c67bcf ("panfrost/blend: Inline blend constants")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20071>
2022-11-30 04:49:17 +00:00
..
bifrost tree-wide: Use __func__ instead of __FUNCTION__ in non-gallium code 2022-11-22 06:53:46 +00:00
ci Revert "glx: Fix drawable refcounting for naked Windows" 2022-11-25 20:08:45 +00:00
drm-shim panfrost: Advertise all textures in drm-shim 2022-04-26 17:47:49 +00:00
ds meson: replace manual compiler flags with meson arguments 2022-08-24 22:13:19 +00:00
include panfrost: Centralize our model list 2022-01-28 17:47:46 +00:00
lib panfrost/blend: Fix invalid const values leading to NIR validation errors 2022-11-30 04:49:17 +00:00
midgard pan/mdg: Fix out-of-order execution 2022-11-23 20:23:50 +00:00
perf panfrost: Separate core ID range from core count 2022-07-08 01:14:55 +00:00
shared lima,panfrost: Use row stride for tiling routines 2022-05-03 14:20:15 +00:00
tools panfrost: Add userspace crash dump decoder and analyser 2022-08-31 23:54:55 +00:00
util panfrost: Don't merge workgroups with variable shared mem 2022-11-02 23:36:56 +00:00
vulkan panfrost: drop wayland-protocols dep 2022-11-23 12:15:23 +00:00
meson.build panfrost: Add userspace crash dump decoder and analyser 2022-08-31 23:54:55 +00:00