aco: fix printing ASM on GFX6-7 if clrxdisasm is not found

Fixes some dEQP-VK.pipeline.executable_properties.* which expect
a valid string to be returned.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5560>
This commit is contained in:
Samuel Pitoiset 2020-06-19 16:11:07 +02:00
parent 053df9bd8f
commit c95d258d1b
1 changed files with 3 additions and 1 deletions

View File

@ -69,7 +69,9 @@ void print_asm_gfx6_gfx7(Program *program, std::vector<uint32_t>& binary,
sprintf(command, "clrxdisasm --gpuType=%s -r %s", gpu_type, path);
p = popen(command, "r");
if (p) {
if (!p || errno == ENOENT) {
out << "clrxdisasm not found\n";
} else {
while (fgets(line, sizeof(line), p))
out << line;
pclose(p);