radv: Fix incorrect assumption about ternary operator precedence
authorDanylo Piliaiev <danylo.piliaiev@gmail.com>
Wed, 18 Jul 2018 08:47:19 +0000 (11:47 +0300)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 19 Jul 2018 08:04:27 +0000 (10:04 +0200)
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_shader.c

index 139900599850c7b8c87b6bdcb86eba8ba634b9f5..aac5b8a21a294d88256a299213f8ad759d22d553 100644 (file)
@@ -361,8 +361,8 @@ radv_alloc_shader_memory(struct radv_device *device,
        slab->bo = device->ws->buffer_create(device->ws, slab->size, 256,
                                             RADEON_DOMAIN_VRAM,
                                             RADEON_FLAG_NO_INTERPROCESS_SHARING |
-                                            device->physical_device->cpdma_prefetch_writes_memory ?
-                                                    0 : RADEON_FLAG_READ_ONLY);
+                                            (device->physical_device->cpdma_prefetch_writes_memory ?
+                                                    0 : RADEON_FLAG_READ_ONLY));
        slab->ptr = (char*)device->ws->buffer_map(slab->bo);
        list_inithead(&slab->shaders);