diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2016-12-16 16:37:04 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2016-12-19 11:32:39 -0800 |
commit | d44aae66cbf000bdca596b4476f17b4218e41151 (patch) | |
tree | e443fe4293917038e586590697c5f86f3b51c6bf | |
parent | f78b65621f461408462db878f6df25af22c8ddb2 (diff) |
isl/docs: Use the code-block instead of the code command
This fixes syntax highlighting.
-rw-r--r-- | src/intel/isl/docs/formats.rst | 4 | ||||
-rw-r--r-- | src/intel/isl/docs/isl-intro.rst | 6 | ||||
-rw-r--r-- | src/intel/isl/docs/tiling.rst | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/intel/isl/docs/formats.rst b/src/intel/isl/docs/formats.rst index 7021b17740..c42030883d 100644 --- a/src/intel/isl/docs/formats.rst +++ b/src/intel/isl/docs/formats.rst @@ -82,7 +82,7 @@ data is encoded in an 8-bit RGBA array format the data is stored in an array of type ``uint8_t`` where the blue component of the ``i``'th color value is accessed as -.. code:: c +.. code-block:: c uint8_t r = ((uint8_t *)data)[i * 4 + 0]; uint8_t g = ((uint8_t *)data)[i * 4 + 1]; @@ -100,7 +100,7 @@ are specified by which bits they occupy within that value. For instance, with the popular ``RGB565`` format, each ``vec3`` takes up 16 bits and the ``i``'th color value is accessed as -.. code:: c +.. code-block:: c uint8_t r = (*(uint8_t *)data >> 0) & 0x1f; uint8_t g = (*(uint8_t *)data >> 5) & 0x3f; diff --git a/src/intel/isl/docs/isl-intro.rst b/src/intel/isl/docs/isl-intro.rst index bb0f91c8c6..7b8b4c4eea 100644 --- a/src/intel/isl/docs/isl-intro.rst +++ b/src/intel/isl/docs/isl-intro.rst @@ -10,7 +10,7 @@ result of that rewrite is ISL. The best place to start with ISL is the ``isl_surf`` data structure: -.. code:: c +.. code-block:: c struct isl_surf { enum isl_surf_dim dim; @@ -158,7 +158,7 @@ which takes an ``isl_surf_init_info`` structure. There is also an ``isl_surf_init`` macro which uses a C99 designated initializer to provide a function-like interface with named parameters. -.. code:: c +.. code-block:: c struct isl_surf_init_info { enum isl_surf_dim dim; @@ -194,7 +194,7 @@ provide a function-like interface with named parameters. The dimensionality of the surface is given by the ``isl_surf_dim`` enum: -.. code:: c +.. code-block:: c enum isl_surf_dim { ISL_SURF_DIM_1D, diff --git a/src/intel/isl/docs/tiling.rst b/src/intel/isl/docs/tiling.rst index bc55df96fd..e534418258 100644 --- a/src/intel/isl/docs/tiling.rst +++ b/src/intel/isl/docs/tiling.rst @@ -72,7 +72,7 @@ ISL Representation The structure of any given tiling format is represented by ISL using the ``isl_tiling`` enum and the ``isl_tile_info`` structure: -.. code:: c +.. code-block:: c enum isl_tiling { ISL_TILING_LINEAR = 0, @@ -94,10 +94,10 @@ The structure of any given tiling format is represented by ISL using the }; bool - isl_tiling_get_info(const struct isl_device \*dev, + isl_tiling_get_info(const struct isl_device *dev, enum isl_tiling tiling, uint32_t format_bpb, - struct isl_tile_info \*info); + struct isl_tile_info *info); Instead of using separate "Tile Mode" and "Tiled Resource Mode" fields like are used by the Sky Lake ``RENDER_SURFACE_STATE`` packet, ISL has a @@ -110,7 +110,7 @@ underlying format has to be passed into ``isl_tiling_get_info``. The proper way to compute the size of an image in bytes given a width and height in elements is as follows: -.. code:: c +.. code-block:: c uint32_t width_tl = DIV_ROUND_UP(width_el, tile_info.logical_extent_el.w); uint32_t height_tl = DIV_ROUND_UP(height_el, tile_info.logical_extent_el.h); @@ -193,7 +193,7 @@ Bit-6 Swizzling When bit-6 swizzling is enabled, bits 9 and 10 are XOR'd in with bit 6 of the tiled address: -.. code:: c +.. code-block:: c addr[6] ^= addr[9] ^ addr[10]; @@ -246,7 +246,7 @@ Bit-6 Swizzling When bit-6 swizzling is enabled, bit 9 is XOR'd in with bit 6 of the tiled address: -.. code:: c +.. code-block:: c addr[6] ^= addr[9]; |