[fuchsia] Fix TODO formatting.
Also, improve consistency of comment style (/* vs //).
Change-Id: I872f1d9ecf729b591b36bb42a4173ded5e3affbb
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/mesa/+/1016100
Reviewed-by: John Rosasco <rosasco@google.com>
Commit-Queue: Josh Gargus <jjosh@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index d0e3bde..a09b0f9 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -54,10 +54,10 @@
}
}
-# TODO(b/321122796): temporary, this should be replaced by `//src/lib/llvm:LLVMHeader_config` at
-# some point, once that one uses platform-specific headers, not just the ${host_platform} ones.
-# This also works around a versioning problem: the sandbox version of LLVM used by Mesa is newer
-# than the prebuilt headers.
+# TODO(https://fxbug.dev/321122796): temporary, this should be replaced by
+# `//src/lib/llvm:LLVMHeader_config` at some point, once that one uses platform-specific headers,
+# not just the ${host_platform} ones. This also works around a versioning problem: the sandbox
+# version of LLVM used by Mesa is newer than the prebuilt headers.
config("LLVMHeader_config") {
cflags = [ "-isystem" + rebase_path("//prebuilt/third_party/llvm/${current_platform}/include",
root_build_dir) ]
diff --git a/src/BUILD.gn b/src/BUILD.gn
index 284f388..2298d04 100644
--- a/src/BUILD.gn
+++ b/src/BUILD.gn
@@ -87,7 +87,7 @@
defines += [ "DEBUG=1" ]
}
- # TODO(fxbug.dev/42077149) fix these warnings and remove the -Wno*
+ # TODO(https://fxbug.dev/42077149) fix these warnings and remove the -Wno*
cflags = [
"-Wno-missing-field-initializers",
"-Wno-initializer-overrides",
@@ -115,7 +115,7 @@
"-Wno-int-in-bool-context",
"-Wno-conversion",
"-Wno-deprecated-anon-enum-enum-conversion",
- # TODO(fxbug.dev/42055484): Fix the warning below and remove -Wno-deprecated-builtins:
+ # TODO(https://fxbug.dev/42055484): Fix the warning below and remove -Wno-deprecated-builtins:
# src/compiler/glsl/list.h:58:4: error: builtin __has_trivial_destructor is deprecated.
"-Wno-unknown-warning-option",
"-Wno-deprecated-builtins",
diff --git a/src/gallium/auxiliary/BUILD.gn b/src/gallium/auxiliary/BUILD.gn
index d7632ba..f8980d1 100644
--- a/src/gallium/auxiliary/BUILD.gn
+++ b/src/gallium/auxiliary/BUILD.gn
@@ -120,7 +120,7 @@
deps = [
":gen",
"$mesa_build_root/src/compiler/nir",
- # TODO(b/321122796):
+ # TODO(https://fxbug.dev/321122796):
# These are for marking JIT memory as executable in lp_bld_fuchsia_memory_mapper.cpp.
# Perhaps this functionality should be moved into a separate target?
"//sdk/fidl/fuchsia.vulkan.loader:fuchsia.vulkan.loader_cpp",
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_fuchsia_memory_mapper.cpp b/src/gallium/auxiliary/gallivm/lp_bld_fuchsia_memory_mapper.cpp
index a1f9dc5..da43148 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_fuchsia_memory_mapper.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_fuchsia_memory_mapper.cpp
@@ -36,7 +36,7 @@
using llvm::sys::MemoryBlock;
using llvm::sys::Process;
-/* TODO(b/321122796): Replace fprintf() with Mesa-idiomatic logging. */
+// TODO(https://fxbug.dev/321122796): Replace fprintf() with Mesa-idiomatic logging.
namespace {
@@ -58,7 +58,7 @@
case llvm::sys::Memory::MF_EXEC:
return ZX_VM_FLAG_PERM_EXECUTE;
default:
- /* TODO(b/321122796): use Mesa-idiomatic logging. */
+ // TODO(https://fxbug.dev/321122796): use Mesa-idiomatic logging.
llvm_unreachable("Illegal memory protection flag specified!");
}
// Provide a default return value as required by some compilers.
@@ -150,7 +150,7 @@
}
}
- /* If anything below here fails, delete the VMO before returning to avoid leakage. */
+ // If anything below here fails, delete the VMO before returning to avoid leakage.
zx::vmo VMO_raii(VMO);
const char* vmo_name = "[lavapipe-llvm]";
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_fuchsia_memory_mapper.hpp b/src/gallium/auxiliary/gallivm/lp_bld_fuchsia_memory_mapper.hpp
index 7f2c0d5..851e846 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_fuchsia_memory_mapper.hpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_fuchsia_memory_mapper.hpp
@@ -46,7 +46,8 @@
private:
zx::resource vmex_;
- // TODO(b/321122796): temporary debugging to find potential memory leaks. Can be removed.
+ // TODO(https://fxbug.dev/321122796): temporary debugging to find potential memory leaks.
+ // Can be removed.
size_t allocation_count_ = 0;
size_t release_count_ = 0;
};
diff --git a/src/gallium/frontends/lavapipe/BUILD.gn b/src/gallium/frontends/lavapipe/BUILD.gn
index b30def4..21962c1 100644
--- a/src/gallium/frontends/lavapipe/BUILD.gn
+++ b/src/gallium/frontends/lavapipe/BUILD.gn
@@ -73,10 +73,10 @@
# Unnecessary because we hardcode GALLIUM_STATIC_TARGETS=1.
"PIPE_SEARCH_DIR=\"UNNECESSARY\"",
- # TODO(b/321122796): otherwise get "use of undeclared identifier 'NULL'" in u_dl.c etc.
- # Is there some better way to define this? If we do decide to define NULL (vs e.g. adding
- # a header include), is this the best place? Probably, since this is closest to where it's
- # needed.
+ # TODO(https://fxbug.dev/321122796): otherwise get "use of undeclared identifier 'NULL'"
+ # in u_dl.c etc. Is there some better way to define this? If we do decide to define NULL
+ # (vs e.g. adding a header include), is this the best place? Probably, since this is closest
+ # to where it's needed.
"NULL=0",
# So that sw_screen_create_vk() is customized to use lavapipe.
diff --git a/src/gbm/backends/magma/gbm_magma.c b/src/gbm/backends/magma/gbm_magma.c
index b76bbd7..3c5418a 100644
--- a/src/gbm/backends/magma/gbm_magma.c
+++ b/src/gbm/backends/magma/gbm_magma.c
@@ -58,7 +58,7 @@
static struct gbm_magma_bo* magma_bo(struct gbm_bo* bo) { return (struct gbm_magma_bo*)bo; }
-/* TODO(fxbug.dev/42172655) - support for all image formats */
+// TODO(https://fxbug.dev/42172655) - support for all image formats
static int bytes_per_pixel() { return 4; }
static int magma_is_format_supported(struct gbm_device* gbm, uint32_t format, uint32_t usage)
@@ -100,12 +100,11 @@
return NULL;
}
- /* DRM formats match GBM formats */
+ // DRM formats match GBM formats
uint32_t drm_format = format;
- /* gbm_bo_create_with_modifiers doesn't let the user specify usage, so if modifiers are
- * provided we assume the user may want their buffer to be presentable.
- */
+ // gbm_bo_create_with_modifiers doesn't let the user specify usage, so if modifiers are
+ // provided we assume the user may want their buffer to be presentable.
bool presentable = (usage & GBM_BO_USE_SCANOUT) || (count > 0);
magma_image_create_info_t create_info = {
@@ -194,7 +193,7 @@
import_data.modifier = DRM_FORMAT_MOD_INVALID;
break;
}
- /* TODO(fxbug.dev/42172655) - support for GBM_BO_IMPORT_WL_BUFFER/GBM_BO_IMPORT_EGL_IMAGE */
+ // TODO(https://fxbug.dev/42172655) - support for GBM_BO_IMPORT_WL_BUFFER/GBM_BO_IMPORT_EGL_IMAGE
default:
LOG_VERBOSE("Unhandled import type: %u\n", type);
return NULL;
@@ -347,7 +346,7 @@
size_t offset = y * bo->v0.stride + x * bytes_per_pixel();
size_t length = (height - 1) * bo->v0.stride + width * bytes_per_pixel();
- /* Don't pass offset to mmap because it must be page aligned */
+ // Don't pass offset to mmap because it must be page aligned
void* addr = mmap(NULL, offset + length, map_flags, MAP_SHARED, fd, 0 /*offset*/);
close(fd);
diff --git a/src/intel/common/intel_magma.c b/src/intel/common/intel_magma.c
index 9ae4774..8c8cc5e 100644
--- a/src/intel/common/intel_magma.c
+++ b/src/intel/common/intel_magma.c
@@ -267,7 +267,7 @@
return 0;
}
-/* TODO(fxbug.dev/42083241): replace this stub with a functioning implementation. */
+// TODO(https://fxbug.dev/42083241): replace this stub with a functioning implementation.
bool intel_gem_read_render_timestamp(int fd, uint64_t *value)
{
*value = 0;
diff --git a/src/intel/compiler/BUILD.gn b/src/intel/compiler/BUILD.gn
index af9abd2..2b84504 100644
--- a/src/intel/compiler/BUILD.gn
+++ b/src/intel/compiler/BUILD.gn
@@ -47,7 +47,7 @@
"-Wno-write-strings",
"-Wno-unused-but-set-variable",
- # TODO(fxbug.dev/42084851): Remove -Wno-unknown-warning-option after the next Clang roll.
+ # TODO(https://fxbug.dev/42084851): Remove -Wno-unknown-warning-option after the next Clang roll.
"-Wno-unknown-warning-option",
"-Wno-vla-cxx-extension",
]
diff --git a/src/intel/vulkan/BUILD.gn b/src/intel/vulkan/BUILD.gn
index caa4cff..dc2bad4f 100644
--- a/src/intel/vulkan/BUILD.gn
+++ b/src/intel/vulkan/BUILD.gn
@@ -22,7 +22,7 @@
import("../../../mesa.gni")
declare_args() {
- # TODO(fxbug.dev/42146493) - remove once external sync FD extensions fully supported
+ # TODO(https://fxbug.dev/42146493) - remove once external sync FD extensions fully supported
anv_enable_external_sync_fd = false
anv_enable_raytracing = false
@@ -103,7 +103,7 @@
cflags_cc = [ "-Wno-c++11-narrowing" ]
if (is_linux) {
- # TODO(fxbug.dev/42082076): support flexible device path
+ # TODO(https://fxbug.dev/42082076): support flexible device path
defines = [ "DEV_GPU_PATH_OVERRIDE=\"/dev/magma0\"" ]
}
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index 819c662..f04f8f3 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -1751,7 +1751,7 @@
alloc_flags, client_address, bo_out);
}
-/* TODO(fxbug.dev/42154140) - don't pass size once lseek is available */
+/* TODO(https://fxbug.dev/42154140) - don't pass size once lseek is available */
VkResult
anv_device_import_bo_with_size(struct anv_device *device,
int fd,
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 788c819..525392f 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -316,7 +316,7 @@
.EXT_index_type_uint8 = true,
.EXT_inline_uniform_block = true,
.EXT_line_rasterization = true,
-#if !defined(USE_MAGMA) // TODO(fxbug.dev/42082629)
+#if !defined(USE_MAGMA) // TODO(https://fxbug.dev/42082629)
/* Enable the extension only if we have support on both the local &
* system memory
*/
@@ -2780,7 +2780,7 @@
break;
}
-#if !defined(USE_MAGMA) // TODO(fxbug.dev/42082629)
+#if !defined(USE_MAGMA) // TODO(https://fxbug.dev/42082629)
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT: {
VkPhysicalDevicePCIBusInfoPropertiesEXT *properties =
(VkPhysicalDevicePCIBusInfoPropertiesEXT *)ext;
@@ -4320,7 +4320,7 @@
fd_info->handleType ==
VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT);
- /* TODO(fxbug.dev/42154140) - don't pass size once lseek is available */
+ /* TODO(https://fxbug.dev/42154140) - don't pass size once lseek is available */
result = anv_device_import_bo_with_size(device, fd_info->fd, aligned_alloc_size, alloc_flags,
client_address, &mem->bo);
if (result != VK_SUCCESS)
@@ -4366,8 +4366,8 @@
// The uint32_t isn't a unique handle per object, so the cache
// lookup in the import will always fail.
- // TODO(fxbug.dev/42079792) - get a unique id for this object and use that as the cache key;
- // then clients will be able to import a buffer more than once.
+ // TODO(https://fxbug.dev/42079792) - get a unique id for this object and use that as the
+ // cache key; then clients will be able to import a buffer more than once.
uint32_t buffer;
uint64_t import_size;
int status = anv_gem_import_fuchsia_buffer(
@@ -4414,8 +4414,8 @@
// The uint32_t isn't a unique handle per object, so the cache
// lookup in the import will always fail.
- // TODO(fxbug.dev/42079792) - get a unique id for this object and use that as the cache key;
- // then clients will be able to import a buffer more than once.
+ // TODO(https://fxbug.dev/42079792) - get a unique id for this object and use that as the
+ // cache key; then clients will be able to import a buffer more than once.
uint32_t buffer;
uint64_t import_size;
int status = anv_gem_import_fuchsia_buffer(device, handle, &buffer, &import_size);
@@ -4477,7 +4477,7 @@
if (image->magma_linux.is_external && !image->magma_linux.gem_handle) {
uint64_t drm_format = 0;
switch (image->vk.format) {
- /* TODO(fxbug.dev/42151277) - proper SRGB handling */
+ /* TODO(https://fxbug.dev/42151277) - proper SRGB handling */
case VK_FORMAT_R8G8B8A8_UNORM:
case VK_FORMAT_R8G8B8A8_SRGB:
drm_format = DRM_FORMAT_ABGR8888;
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index c9b477d..4d53850 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -1617,7 +1617,7 @@
if (external_create_info) {
uint64_t drm_format = 0;
switch (pCreateInfo->format) {
- /* TODO(fxbug.dev/42151277) - proper SRGB handling */
+ // TODO(https://fxbug.dev/42151277) - proper SRGB handling
case VK_FORMAT_R8G8B8A8_UNORM:
case VK_FORMAT_R8G8B8A8_SRGB:
drm_format = DRM_FORMAT_ABGR8888;
diff --git a/src/intel/vulkan/anv_magma.c b/src/intel/vulkan/anv_magma.c
index df908ff..4d1971f 100644
--- a/src/intel/vulkan/anv_magma.c
+++ b/src/intel/vulkan/anv_magma.c
@@ -151,8 +151,8 @@
void* anv_gem_mmap(struct anv_device* device, uint32_t gem_handle, uint64_t offset, uint64_t size,
uint32_t flags)
{
- /* The only expected flag is I915_MMAP_WC, which is ignored. */
- /* TODO(fxbug.dev/42082415): honor the I915_MMAP_WC flag. */
+ // The only expected flag is I915_MMAP_WC, which is ignored.
+ // TODO(https://fxbug.dev/42082415): honor the I915_MMAP_WC flag.
assert((flags | I915_MMAP_WC) == I915_MMAP_WC);
struct anv_magma_buffer* buffer_object = get_buffer_object(
@@ -203,9 +203,7 @@
return 0;
}
-/**
- * On error, \a timeout_ns holds the remaining time.
- */
+// On error, \a timeout_ns holds the remaining time.
int anv_gem_wait(struct anv_device* device, uint32_t gem_handle, int64_t* timeout_ns)
{
struct anv_connection* connection = get_anv_connection(device->vk.magma_connection);
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index f937a37..7e43655 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1364,7 +1364,7 @@
enum anv_bo_alloc_flags alloc_flags,
uint64_t client_address,
struct anv_bo **bo);
-/* TODO(fxbug.dev/42154140) - don't pass size once lseek is available */
+/* TODO(https://fxbug.dev/42154140) - don't pass size once lseek is available */
VkResult anv_device_import_bo_with_size(struct anv_device *device, int fd, uint64_t import_size,
enum anv_bo_alloc_flags alloc_flags,
uint64_t client_address,
diff --git a/src/util/BUILD.gn b/src/util/BUILD.gn
index 8a9c40d..85cbe82 100644
--- a/src/util/BUILD.gn
+++ b/src/util/BUILD.gn
@@ -219,7 +219,7 @@
"u_mm.c",
"u_mm.h",
- # TODO(b/301509045): enable Perfetto support.
+ # TODO(https://fxbug.dev/301509045): enable Perfetto support.
# "u_perfetto.c",
# "u_perfetto.h",
"u_pointer.h",
diff --git a/src/util/os_misc.c b/src/util/os_misc.c
index 8cb18c8..93fd6a8 100644
--- a/src/util/os_misc.c
+++ b/src/util/os_misc.c
@@ -231,7 +231,7 @@
const long phys_pages = sysconf(_SC_PHYS_PAGES);
const long page_size = sysconf(_SC_PAGE_SIZE);
- /* TODO(fxbug.dev/42072376) - remove when starnix supported */
+ /* TODO(https://fxbug.dev/42072376) - remove when starnix supported */
#if DETECT_OS_ANDROID
if (phys_pages <= 0) {
/* Assume 8GB */
@@ -299,7 +299,7 @@
return false;
char *str = strstr(meminfo, "MemAvailable:");
- /* TODO(fxbug.dev/42072376) - remove when starnix supported */
+ /* TODO(https://fxbug.dev/42072376) - remove when starnix supported */
#if DETECT_OS_ANDROID
if (!str) {
/* Assume 4 GB */
diff --git a/src/vulkan/runtime/vk_android.c b/src/vulkan/runtime/vk_android.c
index 453d84f..6743778 100644
--- a/src/vulkan/runtime/vk_android.c
+++ b/src/vulkan/runtime/vk_android.c
@@ -139,8 +139,8 @@
&get_fd, &tmp_fd);
if (result != VK_SUCCESS) {
#if defined(USE_MAGMA)
- // TODO(fxbug.dev/42146493) - just skip this synchronization until magma
- // semaphore export supports sync files.
+ /* TODO(https://fxbug.dev/42146493) - just skip this synchronization until magma
+ semaphore export supports sync files. */
return VK_SUCCESS;
#endif
if (fd >= 0)
diff --git a/src/vulkan/runtime/vk_magma_syncobj.c b/src/vulkan/runtime/vk_magma_syncobj.c
index 943846c..a568633 100644
--- a/src/vulkan/runtime/vk_magma_syncobj.c
+++ b/src/vulkan/runtime/vk_magma_syncobj.c
@@ -120,7 +120,7 @@
{
assert((wait_flags & VK_SYNC_WAIT_PENDING) == 0);
- /* Syncobj timeouts are signed */
+ // Syncobj timeouts are signed
abs_timeout_ns = MIN2(abs_timeout_ns, (uint64_t)INT64_MAX);
STACK_ARRAY(magma_semaphore_t, semaphores, wait_count);
@@ -258,7 +258,7 @@
assert(false);
return VK_ERROR_INVALID_EXTERNAL_HANDLE;
#else
- // TODO(fxbug.dev/42146493) - currently we don't support export to sync files;
+ // TODO(https://fxbug.dev/42146493) - currently we don't support export to sync files;
// failing here helps ANGLE avoid external fences for now.
return VK_ERROR_UNKNOWN;
#endif
diff --git a/src/vulkan/wsi/wsi_common_drm.c b/src/vulkan/wsi/wsi_common_drm.c
index 82c33e4..393287e 100644
--- a/src/vulkan/wsi/wsi_common_drm.c
+++ b/src/vulkan/wsi/wsi_common_drm.c
@@ -340,9 +340,10 @@
if (num_modifier_lists == 0) {
/* If we don't have modifiers, fall back to the legacy "scanout" flag */
#if USE_MAGMA
- // TODO(fxbug.dev/42143708) - this workaround forces Y tiling because
- // wayland bridge assumes it, for best performance in the default
- // composition case.
+ /* TODO(https://fxbug.dev/42143708) - this workaround forces Y tiling because
+ wayland bridge assumes it, for best performance in the default
+ composition case.
+ */
info->wsi.scanout = false;
#else
info->wsi.scanout = true;