nir/linker: Initialize UniformDataDefaults when using SPIR-V
authorArcady Goldmints-Orlov <agoldmints@igalia.com>
Mon, 28 Jan 2019 16:19:28 +0000 (10:19 -0600)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 12 Jul 2019 21:42:41 +0000 (23:42 +0200)
commit637b168470190507c89eca8a7d0479103fe236ae
tree4895842644b0fbbdf0e1c717523c99afa125c9a0
parent761b0fe95f00a9a5adfd0369326eeffb23af449a
nir/linker: Initialize UniformDataDefaults when using SPIR-V

Allocate UniformDataDefaults and fill in the data defaults when
linking a SPIR-V program. Among other things, this allows program
serialization to work.

It allows the following piglit test (when run on SPIR-V mode) to pass:
  spec/arb_get_program_binary/execution/uniform-after-restore.shader_test

v2: use memcpy to initialize UniformDataDefaults

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/glsl/gl_nir_link_uniform_initializers.c
src/compiler/glsl/gl_nir_link_uniforms.c