Skip to content

Commit

Permalink
Enable VK_TRACE for debugging purpose
Browse files Browse the repository at this point in the history
Signed-off-by: Mi, Yanfeng <[email protected]>
  • Loading branch information
Yanfeng-Mi committed May 28, 2024
1 parent 5bd3c53 commit 87dde39
Show file tree
Hide file tree
Showing 14 changed files with 212 additions and 6 deletions.
4 changes: 2 additions & 2 deletions android/mesa3d_cross.mk
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ MESA3D_GLES_BINS := \
MESON_GEN_NINJA := \
cd $(MESON_OUT_DIR) && PATH=/usr/bin:/usr/local/bin:$$PATH meson ./build \
--cross-file $(call relative-to-absolute,$(MESON_GEN_DIR))/aosp_cross \
--buildtype=release \
--buildtype=debug \
-Ddri-search-path=/vendor/$(MESA3D_LIB_DIR)/dri \
-Dplatforms=android \
-Dplatform-sdk-version=$(PLATFORM_SDK_VERSION) \
Expand Down Expand Up @@ -127,7 +127,7 @@ $(MESON_GEN_FILES_TARGET): PRIVATE_CPPFLAGS := $(my_cppflags)
$(MESON_GEN_FILES_TARGET): PRIVATE_CFLAGS_NO_OVERRIDE := $(my_cflags_no_override)
$(MESON_GEN_FILES_TARGET): PRIVATE_CPPFLAGS_NO_OVERRIDE := $(my_cppflags_no_override)
$(MESON_GEN_FILES_TARGET): PRIVATE_RTTI_FLAG := $(LOCAL_RTTI_FLAG)
$(MESON_GEN_FILES_TARGET): PRIVATE_DEBUG_CFLAGS := $(debug_cflags)
$(MESON_GEN_FILES_TARGET): PRIVATE_DEBUG_CFLAGS := -DDEBUG
$(MESON_GEN_FILES_TARGET): PRIVATE_C_INCLUDES := $(my_c_includes)
$(MESON_GEN_FILES_TARGET): PRIVATE_IMPORTED_INCLUDES := $(imported_includes)
$(MESON_GEN_FILES_TARGET): PRIVATE_LDFLAGS := $(my_ldflags)
Expand Down
4 changes: 2 additions & 2 deletions src/egl/main/egllog.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ _eglLog(EGLint level, const char *fmtStr, ...)
/* one-time initialization; a little race here is fine */
if (!logging.initialized)
_eglInitLogger();
if (level > logging.level || level < 0)
return;
//if (level > logging.level || level < 0)
// return;

simple_mtx_lock(&logging.mutex);

Expand Down
9 changes: 9 additions & 0 deletions src/intel/vulkan/anv_astc_emu.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ astc_emu_init_image_view(struct anv_cmd_buffer *cmd_buffer,
VkImageUsageFlags usage,
uint32_t level, uint32_t layer)
{
vk_trace();
struct anv_device *device = cmd_buffer->device;

const VkImageViewCreateInfo create_info = {
Expand Down Expand Up @@ -48,6 +49,7 @@ astc_emu_init_push_descriptor_set(struct anv_cmd_buffer *cmd_buffer,
uint32_t write_count,
const VkWriteDescriptorSet *writes)
{
vk_trace();
struct anv_device *device = cmd_buffer->device;
struct anv_descriptor_set_layout *layout =
anv_descriptor_set_layout_from_handle(_layout);
Expand All @@ -61,6 +63,7 @@ astc_emu_init_push_descriptor_set(struct anv_cmd_buffer *cmd_buffer,
static void
astc_emu_init_flush_denorm_shader(nir_builder *b)
{
vk_trace();
b->shader->info.workgroup_size[0] = 8;
b->shader->info.workgroup_size[1] = 8;

Expand Down Expand Up @@ -145,6 +148,7 @@ astc_emu_init_flush_denorm_shader(nir_builder *b)
static VkResult
astc_emu_init_flush_denorm_pipeline_locked(struct anv_device *device)
{
vk_trace();
struct anv_device_astc_emu *astc_emu = &device->astc_emu;
VkDevice _device = anv_device_to_handle(device);
VkResult result = VK_SUCCESS;
Expand Down Expand Up @@ -226,6 +230,7 @@ astc_emu_init_flush_denorm_pipeline_locked(struct anv_device *device)
static VkResult
astc_emu_init_flush_denorm_pipeline(struct anv_device *device)
{
vk_trace();
struct anv_device_astc_emu *astc_emu = &device->astc_emu;
VkResult result = VK_SUCCESS;

Expand All @@ -245,6 +250,7 @@ astc_emu_flush_denorm_slice(struct anv_cmd_buffer *cmd_buffer,
VkImageView dst_view,
VkRect2D rect)
{
vk_trace();
struct anv_device *device = cmd_buffer->device;
struct anv_device_astc_emu *astc_emu = &device->astc_emu;
VkCommandBuffer cmd_buffer_ = anv_cmd_buffer_to_handle(cmd_buffer);
Expand Down Expand Up @@ -337,6 +343,7 @@ astc_emu_decompress_slice(struct anv_cmd_buffer *cmd_buffer,
VkImageView dst_view,
VkRect2D rect)
{
vk_trace();
struct anv_device *device = cmd_buffer->device;
struct anv_device_astc_emu *astc_emu = &device->astc_emu;
VkCommandBuffer cmd_buffer_ = anv_cmd_buffer_to_handle(cmd_buffer);
Expand Down Expand Up @@ -416,6 +423,7 @@ anv_astc_emu_process(struct anv_cmd_buffer *cmd_buffer,
VkOffset3D block_offset,
VkExtent3D block_extent)
{
vk_trace();
const bool flush_denorms =
cmd_buffer->device->physical->flush_astc_ldr_void_extent_denorms;

Expand Down Expand Up @@ -480,6 +488,7 @@ anv_astc_emu_process(struct anv_cmd_buffer *cmd_buffer,
VkResult
anv_device_init_astc_emu(struct anv_device *device)
{
vk_trace();
struct anv_device_astc_emu *astc_emu = &device->astc_emu;
VkResult result = VK_SUCCESS;

Expand Down
Loading

0 comments on commit 87dde39

Please sign in to comment.