From 6a2936b87683d39beb81ccba831ae7de47063bc6 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Wed, 13 Jan 2010 20:46:53 -0800 Subject: gallium/docs: Random things sitting around in my stash. --- src/gallium/docs/source/distro.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gallium/docs/source') diff --git a/src/gallium/docs/source/distro.rst b/src/gallium/docs/source/distro.rst index 33e846e33d..a448203c6f 100644 --- a/src/gallium/docs/source/distro.rst +++ b/src/gallium/docs/source/distro.rst @@ -118,6 +118,9 @@ Gallivm Indices ^^^^^^^ +Tool for translating or generating element indices for element-based +rendering. + Pipe Buffer Manager ^^^^^^^^^^^^^^^^^^^ @@ -127,12 +130,11 @@ Remote Debugger Runtime Assembly Emission ^^^^^^^^^^^^^^^^^^^^^^^^^ -Surface Context Tracker -^^^^^^^^^^^^^^^^^^^^^^^ - TGSI ^^^^ +Basic utilities for manipulating TGSI streams. + Translate ^^^^^^^^^ -- cgit v1.2.3 From ffd28480560caecfb676a4bbe85a85672271e3f7 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Thu, 14 Jan 2010 18:55:52 +0100 Subject: gallium: Document drawing commands. --- src/gallium/docs/source/context.rst | 59 +++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) (limited to 'src/gallium/docs/source') diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst index 21f5f9111a..3183954638 100644 --- a/src/gallium/docs/source/context.rst +++ b/src/gallium/docs/source/context.rst @@ -72,12 +72,67 @@ stencil-only clears of packed depth-stencil buffers. Drawing ^^^^^^^ -``draw_arrays`` +``draw_arrays`` draws a specified primitive. -``draw_elements`` +This command is equivalent to calling ``draw_arrays_instanced`` +with ``startInstance`` set to 0 and ``instanceCount`` set to 1. + +``draw_elements`` draws a specified primitive using an optional +index buffer. + +This command is equivalent to calling ``draw_elements_instanced`` +with ``startInstance`` set to 0 and ``instanceCount`` set to 1. ``draw_range_elements`` +XXX: this is (probably) a temporary entrypoint, as the range +information should be available from the vertex_buffer state. +Using this to quickly evaluate a specialized path in the draw +module. + +``draw_arrays_instanced`` draws multiple instances of the same primitive. + +This command is equivalent to calling ``draw_elements_instanced`` +with ``indexBuffer`` set to NULL and ``indexSize`` set to 0. + +``draw_elements_instanced`` draws multiple instances of the same primitive +using an optional index buffer. + +For instanceID in the range between ``startInstance`` +and ``startInstance``+``instanceCount``-1, inclusive, draw a primitive +specified by ``mode`` and sequential numbers in the range between ``start`` +and ``start``+``count``-1, inclusive. + +If ``indexBuffer`` is not NULL, it specifies an index buffer with index +byte size of ``indexSize``. The sequential numbers are used to lookup +the index buffer and the resulting indices in turn are used to fetch +vertex attributes. + +If ``indexBuffer`` is NULL, the sequential numbers are used directly +as indices to fetch vertex attributes. + +If a given vertex element has ``instance_divisor`` set to 0, it is said +it contains per-vertex data and effective vertex attribute address needs +to be recalculated for every index. + + attribAddr = ``stride`` * index + ``src_offset`` + +If a given vertex element has ``instance_divisor`` set to non-zero, +it is said it contains per-instance data and effective vertex attribute +address needs to recalculated for every ``instance_divisor``-th instance. + + attribAddr = ``stride`` * instanceID / ``instance_divisor`` + ``src_offset`` + +In the above formulas, ``src_offset`` is taken from the given vertex element +and ``stride`` is taken from a vertex buffer associated with the given +vertex element. + +The calculated attribAddr is used as an offset into the vertex buffer to +fetch the attribute data. + +The value of ``instanceID`` can be read in a vertex shader through a system +value register declared with INSTANCEID semantic name. + Queries ^^^^^^^ -- cgit v1.2.3 From 1c4ad778126788cebcb54342837042bfe432d504 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Fri, 15 Jan 2010 17:55:42 +0100 Subject: gallium: remove set_edgeflags from docs --- src/gallium/docs/source/context.rst | 1 - 1 file changed, 1 deletion(-) (limited to 'src/gallium/docs/source') diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst index 3183954638..4767cfb0d8 100644 --- a/src/gallium/docs/source/context.rst +++ b/src/gallium/docs/source/context.rst @@ -47,7 +47,6 @@ These pieces of state are too small, variable, and/or trivial to have CSO objects. They all follow simple, one-method binding calls, e.g. ``set_edgeflags``. -* ``set_edgeflags`` * ``set_blend_color`` * ``set_clip_state`` * ``set_polygon_stipple`` -- cgit v1.2.3 From bf575b6c270600e6f166def818f69edcc9c64484 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Fri, 15 Jan 2010 18:25:14 +0100 Subject: gallium: document set_constant_buffer --- src/gallium/docs/source/context.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gallium/docs/source') diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst index 4767cfb0d8..d394f5b4f1 100644 --- a/src/gallium/docs/source/context.rst +++ b/src/gallium/docs/source/context.rst @@ -33,7 +33,11 @@ This state describes how resources in various flavours (textures, buffers, surfaces) are bound to the driver. -* ``set_constant_buffer`` +* ``set_constant_buffer`` sets a constant buffer to be used for a given shader + type. index is used to indicate which buffer to set (some apis may allow + multiple ones to be set, and binding a specific one later, though drivers + are mostly restricted to the first one right now). + * ``set_framebuffer_state`` * ``set_fragment_sampler_textures`` * ``set_vertex_sampler_textures`` -- cgit v1.2.3