Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix links in buffer format help widget and brackets in documentation #3121

Merged
merged 2 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/how/how_buffer_format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ The buffer format supports annotations on declarations to specify special proper
Struct definitions support the following annotations:

* ``[[size(number)]]`` or ``[[byte_size(number)]]`` - Forces the struct to be padded up to a given size even if the contents don't require it.
* ``[[single]]`` or ``[fixed]]`` - Forces the struct to be considered as a fixed SoA definition, even if in context the buffer viewer may default to AoS. See the below section for more details. Structs with this annotation **may not** be declared as a variable, and should instead be the implicit final struct in a definition.
* ``[[single]]`` or ``[[fixed]]`` - Forces the struct to be considered as a fixed SoA definition, even if in context the buffer viewer may default to AoS. See the below section for more details. Structs with this annotation **may not** be declared as a variable, and should instead be the implicit final struct in a definition.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice to copy over the ":ref:the below section<aos-soa that is used in the Variable section to replace the unlinked "the below section"

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd agree that this would be nice but it's a pre-existing issue not related to your fix, so if you'd rather I merge this as is then let me know and I will.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't actually have a build environment set up for the documentation locally, so I'd rather not make that change myself just in case there's some nuance to the formatting I'm not aware of. But that does seem like a good idea.


Variable declarations support the following annotations:

* ``[[offset(number)]]`` or ``[[byte_offset(number)]]`` - Forces this member to be at a given offset **relative to its parent**. This cannot place the member any earlier than it would have according to tight packing with the current packing rules.
* ``[[pad]]`` or ``[[padding]]`` - Mark this member as padding, such that structure layout is calculated accounting for it but it is not displayed visibly.
* ``[[single]]`` or ``[fixed]]`` - Forces this variable to be considered as a fixed SoA definition, even if in context the buffer viewer may default to AoS. See :ref:`the below section <aos-soa>` for more details. This must be a global variable, and it must be the only global variable in the format definition.
* ``[[single]]`` or ``[[fixed]]`` - Forces this variable to be considered as a fixed SoA definition, even if in context the buffer viewer may default to AoS. See :ref:`the below section <aos-soa>` for more details. This must be a global variable, and it must be the only global variable in the format definition.
* ``[[row_major]]`` or ``[[col_major]]`` - Declares the memory order for a matrix.
* ``[[rgb]]`` - Will color the background of any repeated data by interpreting its contents as RGB color.
* ``[[hex]]`` or ``[[hexadecimal]]`` - Will show integer data as hexadecimal.
Expand Down Expand Up @@ -209,7 +209,7 @@ In the opposite direction, normally a loose collection of variables without any
float c;
};

However if the desire is to display this as a single fixed element where the fixed tree view is more appropriate, the structure or an variable of it can be annotated as ``[single]]`` or ``[[fixed]]``.
However if the desire is to display this as a single fixed element where the fixed tree view is more appropriate, the structure or an variable of it can be annotated as ``[[single]]`` or ``[[fixed]]``.

.. code:: c++

Expand Down
7 changes: 5 additions & 2 deletions qrenderdoc/Widgets/BufferFormatSpecifier.ui
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<number>0</number>
</property>
<item>
<widget class="QTextEdit" name="helpText">
<widget class="QTextBrowser" name="helpText">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
Expand All @@ -78,7 +78,10 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Annotations are supported for explicit layout, bitpacked types like R10G10B10A2, or alternate displays of values including RGB/hexadecimal/octal display. For a complete list see &lt;/span&gt;&lt;a href=&quot;https://renderdoc.org/docs/how/how_buffer_format.html&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;the documentation linked above&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse|Qt::LinksAccessibleByMouse|Qt::LinksAccessibleByKeyboard</set>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
Expand Down