From de6e95845c81f4f519bf4f504f5f08fd786ae9d5 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 15 Dec 2017 14:14:40 +0000 Subject: [PATCH] When specifying a built-in type return type, always put it in ``s --- qrenderdoc/Code/Interface/QRDInterface.h | 12 ++++++------ renderdoc/api/replay/d3d11_pipestate.h | 2 +- renderdoc/api/replay/d3d12_pipestate.h | 2 +- renderdoc/api/replay/data_types.h | 6 +++--- renderdoc/api/replay/gl_pipestate.h | 2 +- renderdoc/api/replay/renderdoc_replay.h | 8 ++++---- renderdoc/api/replay/replay_enums.h | 10 +++++----- renderdoc/api/replay/vk_pipestate.h | 2 +- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/qrenderdoc/Code/Interface/QRDInterface.h b/qrenderdoc/Code/Interface/QRDInterface.h index 668743f42..65c06b3ac 100644 --- a/qrenderdoc/Code/Interface/QRDInterface.h +++ b/qrenderdoc/Code/Interface/QRDInterface.h @@ -297,7 +297,7 @@ struct IResourceInspector DOCUMENT(R"(Return which resource is currently being inspected. :return: The ID of the resource being inspected. -:rtype: renderdoc.ResourceId id +:rtype: ~renderdoc.ResourceId )"); virtual ResourceId CurrentResource() = 0; @@ -1183,7 +1183,7 @@ in the capture, either a name set via API-specific debug methods, or an auto-gen the resource type. :return: The current name of the resource. -:rtype: str +:rtype: ``str`` )"); virtual rdcstr GetResourceName(ResourceId id) = 0; @@ -1194,7 +1194,7 @@ If not, the name is just auto-generated based on the ID and resource type, so de circumstance it may be preferable to omit the name. :return: Whether the name for the resource has just been auto-generated. -:rtype: bool +:rtype: ``bool`` )"); virtual bool IsAutogeneratedName(ResourceId id) = 0; @@ -1206,7 +1206,7 @@ only check if a name has been set in the UI itself, a resource could still have was set programmatically during capture time. :return: Whether the name for the resource has been customised with :meth:`SetResourceCustomName`. -:rtype: bool +:rtype: ``bool`` )"); virtual bool HasResourceCustomName(ResourceId id) = 0; @@ -1234,7 +1234,7 @@ The index starts at 1, so initialising an internal cache to 0 will cause the fir considered out of date :return: An incrementing index that can be used as a quick check if any names have changed. -:rtype: int +:rtype: ``int`` )"); virtual int ResourceNameCacheID() = 0; @@ -1339,7 +1339,7 @@ Examples of fields are: :param str key: The name of the notes field to retrieve. :return: The contents, or an empty string if the field doesn't exist. -:rtype: str +:rtype: ``str`` )"); virtual rdcstr GetNotes(const rdcstr &key) = 0; diff --git a/renderdoc/api/replay/d3d11_pipestate.h b/renderdoc/api/replay/d3d11_pipestate.h index cf12daace..11f758a5b 100644 --- a/renderdoc/api/replay/d3d11_pipestate.h +++ b/renderdoc/api/replay/d3d11_pipestate.h @@ -312,7 +312,7 @@ struct Sampler DOCUMENT(R"(Check if the border color is used in this D3D11 sampler. :return: ``True`` if the border color is used, ``False`` otherwise. -:rtype: bool +:rtype: ``bool`` )"); bool UseBorder() const { diff --git a/renderdoc/api/replay/d3d12_pipestate.h b/renderdoc/api/replay/d3d12_pipestate.h index 48c296570..33b81148d 100644 --- a/renderdoc/api/replay/d3d12_pipestate.h +++ b/renderdoc/api/replay/d3d12_pipestate.h @@ -347,7 +347,7 @@ struct Sampler DOCUMENT(R"(Check if the border color is used in this D3D12 sampler. :return: ``True`` if the border color is used, ``False`` otherwise. -:rtype: bool +:rtype: ``bool`` )"); bool UseBorder() const { diff --git a/renderdoc/api/replay/data_types.h b/renderdoc/api/replay/data_types.h index 6426d6d9a..cedb3003b 100644 --- a/renderdoc/api/replay/data_types.h +++ b/renderdoc/api/replay/data_types.h @@ -155,7 +155,7 @@ struct ResourceFormat bool operator!=(const ResourceFormat &r) const { return !(*this == r); } DOCUMENT(R"(:return: The name of the format. -:rtype: str +:rtype: ``str`` )"); rdcstr Name() const { @@ -165,7 +165,7 @@ struct ResourceFormat } DOCUMENT(R"(:return: ``True`` if the ``ResourceFormat`` is a 'special' non-regular type. -:type: bool +:type: ``bool`` )"); bool Special() const { return type != ResourceFormatType::Regular; } DOCUMENT(R"(The :class:`ResourceFormatType` of this format. If the value is not @@ -1366,7 +1366,7 @@ pixel. DOCUMENT(R"(Determine if this fragment passed all tests and wrote to the texture. :return: ``True`` if it passed all tests, ``False`` if it failed any. -:rtype: bool +:rtype: ``bool`` )"); bool passed() const { diff --git a/renderdoc/api/replay/gl_pipestate.h b/renderdoc/api/replay/gl_pipestate.h index 4ac8bd362..f3b396667 100644 --- a/renderdoc/api/replay/gl_pipestate.h +++ b/renderdoc/api/replay/gl_pipestate.h @@ -311,7 +311,7 @@ struct Sampler DOCUMENT(R"(Check if the border color is used in this OpenGL sampler. :return: ``True`` if the border color is used, ``False`` otherwise. -:rtype: bool +:rtype: ``bool`` )"); bool UseBorder() const { diff --git a/renderdoc/api/replay/renderdoc_replay.h b/renderdoc/api/replay/renderdoc_replay.h index 67d667b99..7ab306a6a 100644 --- a/renderdoc/api/replay/renderdoc_replay.h +++ b/renderdoc/api/replay/renderdoc_replay.h @@ -689,7 +689,7 @@ or hardware-specific ISA formats. :param str target: The name of the disassembly target to generate for. Must be one of the values returned by :meth:`GetDisassemblyTargets`, or empty to use the default generation. :return: The disassembly text, or an error message if something went wrong. -:rtype: str +:rtype: ``str`` )"); virtual rdcstr DisassembleShader(ResourceId pipeline, const ShaderReflection *refl, const char *target) = 0; @@ -1144,7 +1144,7 @@ already has the same type or name, it will be overwritten (two sections cannot s or name). :param SectionProperties props: The properties of the section to be written. -:param byte contents: The raw contents of the section. +:param bytes contents: The raw contents of the section. )"); virtual void WriteSection(const SectionProperties &props, const bytebuf &contents) = 0; @@ -1389,7 +1389,7 @@ file. :param str filename: The filename to copy to. :return: ``True`` if the operation succeeded. -:rtype: bool +:rtype: ``bool`` )"); virtual bool CopyFileTo(const char *filename) = 0; @@ -1412,7 +1412,7 @@ The error string is not reset by calling this function so it's safe to call mult any other function call may reset the error string to empty. :return: The error string, if one exists, or an empty string. -:rtype: str +:rtype: ``str`` )"); virtual rdcstr ErrorString() = 0; diff --git a/renderdoc/api/replay/replay_enums.h b/renderdoc/api/replay/replay_enums.h index 1f30e46d2..9afb65323 100644 --- a/renderdoc/api/replay/replay_enums.h +++ b/renderdoc/api/replay/replay_enums.h @@ -1493,7 +1493,7 @@ DOCUMENT(R"(Return the number of control points in a patch list ``Topology`` :param Topology t: The patch list topology :return: The number of control points in the specified topology -:rtype: int +:rtype: ``int`` )"); constexpr inline uint32_t PatchList_Count(Topology topology) { @@ -1506,7 +1506,7 @@ DOCUMENT(R"(Check whether or not this is a strip-type topology. :param Topology t: The topology to check. :return: ``True`` if it describes a strip topology, ``False`` for a list. -:rtype: int +:rtype: ``int`` )"); constexpr inline bool IsStrip(Topology topology) { @@ -2659,7 +2659,7 @@ DOCUMENT(R"(Check whether or not this is an AMD private counter. :param GPUCounter c: The counter. :return: ``True`` if it is an AMD private counter, ``False`` if it's not. -:rtype: bool +:rtype: ``bool`` )"); inline constexpr bool IsAMDCounter(GPUCounter c) { @@ -2670,7 +2670,7 @@ DOCUMENT(R"(Check whether or not this is an Intel private counter. :param GPUCounter c: The counter. :return: ``True`` if it is an Intel private counter, ``False`` if it's not. -:rtype: bool +:rtype: ``bool`` )"); inline constexpr bool IsIntelCounter(GPUCounter c) { @@ -2681,7 +2681,7 @@ DOCUMENT(R"(Check whether or not this is an Nvidia private counter. :param GPUCounter c: The counter. :return: ``True`` if it is an Nvidia private counter, ``False`` if it's not. -:rtype: bool +:rtype: ``bool`` )"); inline constexpr bool IsNvidiaCounter(GPUCounter c) { diff --git a/renderdoc/api/replay/vk_pipestate.h b/renderdoc/api/replay/vk_pipestate.h index d5be71fa2..67853e9bc 100644 --- a/renderdoc/api/replay/vk_pipestate.h +++ b/renderdoc/api/replay/vk_pipestate.h @@ -161,7 +161,7 @@ struct BindingElement DOCUMENT(R"(For samplers - check if the border color is used in this Vulkan sampler. :return: ``True`` if the border color is used, ``False`` otherwise. -:rtype: bool +:rtype: ``bool`` )"); bool UseBorder() const {