[Bug,101977] UE4 4.17 causes Assertion `G_0286CC_LINEAR_CENTER_ENA(shader->config.spi_ps_input_addr)' failed
diff mbox

Message ID bug-101977-502-guixgWrr2p@http.bugs.freedesktop.org/
State New
Headers show

Commit Message

bugzilla-daemon@freedesktop.org Aug. 8, 2017, 9:12 p.m. UTC
https://bugs.freedesktop.org/show_bug.cgi?id=101977

--- Comment #12 from Marek Olšák <maraeo@gmail.com> ---
.AMDGPU.config coming from LLVM is empty with UE4Editor. This assertion fails:

binary->config_size);
                } else if (!strcmp(name, ".AMDGPU.disasm")) {

Any ideas?

Patch
diff mbox

diff --git a/src/amd/common/ac_binary.c b/src/amd/common/ac_binary.c
index 618b5cf..2fbb575 100644
--- a/src/amd/common/ac_binary.c
+++ b/src/amd/common/ac_binary.c
@@ -148,6 +148,7 @@  void ac_elf_read(const char *elf_data, unsigned elf_size,
                } else if (!strcmp(name, ".AMDGPU.config")) {
                        section_data = elf_getdata(section, section_data);
                        binary->config_size = section_data->d_size;
+                       assert(binary->config_size);
                        binary->config = MALLOC(binary->config_size *
sizeof(unsigned char));
                        memcpy(binary->config, section_data->d_buf,