From: Marcin Ślusarz Date: Mon, 14 Sep 2020 16:53:13 +0000 (+0200) Subject: anv: drop likely/unlikely around INTEL_DEBUG X-Git-Tag: upstream/21.0.0~4596 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e06da554e9e1bcbeedfb31b60c175b6c5211d809;p=platform%2Fupstream%2Fmesa.git anv: drop likely/unlikely around INTEL_DEBUG It's included in declaration of INTEL_DEBUG. Signed-off-by: Marcin Ślusarz Acked-by: Lionel Landwerlin Reviewed-by: Matt Turner Reviewed-by: Eric Anholt Part-of: --- diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index 1258af7..d6d8554 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -1750,7 +1750,7 @@ anv_queue_execbuf_locked(struct anv_queue *queue, submit->cmd_buffer && submit->cmd_buffer->perf_query_pool; - if (unlikely(INTEL_DEBUG & DEBUG_BATCH)) { + if (INTEL_DEBUG & DEBUG_BATCH) { if (submit->cmd_buffer) { if (has_perf_query) { struct anv_query_pool *query_pool = submit->cmd_buffer->perf_query_pool; @@ -1816,7 +1816,7 @@ anv_queue_execbuf_locked(struct anv_queue *queue, /* Some performance queries just the pipeline statistic HW, no need for * OA in that case, so no need to reconfigure. */ - if (likely((INTEL_DEBUG & DEBUG_NO_OACONFIG) == 0) && + if ((INTEL_DEBUG & DEBUG_NO_OACONFIG) == 0 && (query_info->kind == GEN_PERF_QUERY_TYPE_OA || query_info->kind == GEN_PERF_QUERY_TYPE_RAW)) { int ret = gen_ioctl(device->perf_fd, I915_PERF_IOCTL_CONFIG, diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index fe24730..01f6c4a 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -97,7 +97,7 @@ compiler_perf_log(void *data, const char *fmt, ...) va_list args; va_start(args, fmt); - if (unlikely(INTEL_DEBUG & DEBUG_PERF)) + if (INTEL_DEBUG & DEBUG_PERF) mesa_logd_v(fmt, args); va_end(args); diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index ee6247f..a949ea4 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -398,7 +398,7 @@ add_aux_surface_if_supported(struct anv_device *device, return VK_SUCCESS; } - if (unlikely(INTEL_DEBUG & DEBUG_NO_HIZ)) + if (INTEL_DEBUG & DEBUG_NO_HIZ) return VK_SUCCESS; ok = isl_surf_get_hiz_surf(&device->isl_dev, @@ -481,7 +481,7 @@ add_aux_surface_if_supported(struct anv_device *device, return VK_SUCCESS; } - if (unlikely(INTEL_DEBUG & DEBUG_NO_RBC)) + if (INTEL_DEBUG & DEBUG_NO_RBC) return VK_SUCCESS; ok = isl_surf_get_ccs_surf(&device->isl_dev, diff --git a/src/intel/vulkan/anv_perf.c b/src/intel/vulkan/anv_perf.c index d96008f..ba6f677 100644 --- a/src/intel/vulkan/anv_perf.c +++ b/src/intel/vulkan/anv_perf.c @@ -187,7 +187,7 @@ VkResult anv_AcquirePerformanceConfigurationINTEL( if (!config) return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); - if (likely(!(INTEL_DEBUG & DEBUG_NO_OACONFIG))) { + if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG)) { config->register_config = gen_perf_load_configuration(device->physical->perf, device->fd, GEN_PERF_QUERY_GUID_MDAPI); @@ -223,7 +223,7 @@ VkResult anv_ReleasePerformanceConfigurationINTEL( ANV_FROM_HANDLE(anv_device, device, _device); ANV_FROM_HANDLE(anv_performance_configuration_intel, config, _configuration); - if (likely(!(INTEL_DEBUG & DEBUG_NO_OACONFIG))) + if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG)) gen_ioctl(device->fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG, &config->config_id); ralloc_free(config->register_config); @@ -241,7 +241,7 @@ VkResult anv_QueueSetPerformanceConfigurationINTEL( ANV_FROM_HANDLE(anv_performance_configuration_intel, config, _configuration); struct anv_device *device = queue->device; - if (likely(!(INTEL_DEBUG & DEBUG_NO_OACONFIG))) { + if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG)) { if (device->perf_fd < 0) { device->perf_fd = anv_device_perf_open(device, config->config_id); if (device->perf_fd < 0) @@ -370,7 +370,7 @@ VkResult anv_AcquireProfilingLockKHR( assert(device->perf_fd == -1); - if (likely(!(INTEL_DEBUG & DEBUG_NO_OACONFIG))) { + if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG)) { fd = anv_device_perf_open(device, first_metric_set->oa_metrics_set_id); if (fd < 0) return VK_TIMEOUT; @@ -385,7 +385,7 @@ void anv_ReleaseProfilingLockKHR( { ANV_FROM_HANDLE(anv_device, device, _device); - if (likely(!(INTEL_DEBUG & DEBUG_NO_OACONFIG))) { + if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG)) { assert(device->perf_fd >= 0); close(device->perf_fd); } diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 36da2cc..f8921de 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -247,7 +247,7 @@ anv_shader_compile_to_nir(struct anv_device *device, free(spec_entries); - if (unlikely(INTEL_DEBUG & intel_debug_flag_for_shader_stage(stage))) { + if (INTEL_DEBUG & intel_debug_flag_for_shader_stage(stage)) { fprintf(stderr, "NIR (from SPIR-V) for %s shader:\n", gl_shader_stage_name(stage)); nir_print_shader(nir, stderr); diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index aa216cb..e35b499 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -536,7 +536,7 @@ void anv_loge_v(const char *format, va_list va); #define anv_perf_warn(instance, obj, format, ...) \ do { \ static bool reported = false; \ - if (!reported && unlikely(INTEL_DEBUG & DEBUG_PERF)) { \ + if (!reported && (INTEL_DEBUG & DEBUG_PERF)) { \ __anv_perf_warn(instance, obj, REPORT_OBJECT_TYPE(obj), __FILE__, __LINE__,\ format, ##__VA_ARGS__); \ reported = true; \ diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 259e175..a2d185b 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -1827,7 +1827,7 @@ genX(cmd_buffer_config_l3)(struct anv_cmd_buffer *cmd_buffer, if (cfg == cmd_buffer->state.current_l3_config) return; - if (unlikely(INTEL_DEBUG & DEBUG_L3)) { + if (INTEL_DEBUG & DEBUG_L3) { mesa_logd("L3 config transition: "); gen_dump_l3_config(cfg, stderr); }