From: Corbin Simpson Date: Tue, 22 Dec 2009 04:33:18 +0000 (-0800) Subject: docs: Regenerate. X-Git-Tag: 062012170305~12852^2~1915^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a7b2f7e9577a822b53fca20f0797940aaafaab1;p=profile%2Fivi%2Fmesa.git docs: Regenerate. --- diff --git a/src/gallium/docs/build/html/.buildinfo b/src/gallium/docs/build/html/.buildinfo index 3b3a154..91dc31f 100644 --- a/src/gallium/docs/build/html/.buildinfo +++ b/src/gallium/docs/build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 337274cf474a8d2d6871c416a4911d5e +config: e48279c15771d329f916579cf997b5a9 tags: fbb0d17656682115ca4d033fb2f83ba1 diff --git a/src/gallium/docs/build/html/_sources/context.txt b/src/gallium/docs/build/html/_sources/context.txt index 6470e8f..21f5f91 100644 --- a/src/gallium/docs/build/html/_sources/context.txt +++ b/src/gallium/docs/build/html/_sources/context.txt @@ -25,6 +25,21 @@ CSO objects handled by the context object: * :ref:`Shader`: These have two sets of methods. ``*_fs_state`` is for fragment shaders, and ``*_vs_state`` is for vertex shaders. + +Resource Binding State +^^^^^^^^^^^^^^^^^^^^^^ + +This state describes how resources in various flavours (textures, +buffers, surfaces) are bound to the driver. + + +* ``set_constant_buffer`` +* ``set_framebuffer_state`` +* ``set_fragment_sampler_textures`` +* ``set_vertex_sampler_textures`` +* ``set_vertex_buffers`` + + Non-CSO State ^^^^^^^^^^^^^ @@ -35,47 +50,79 @@ objects. They all follow simple, one-method binding calls, e.g. * ``set_edgeflags`` * ``set_blend_color`` * ``set_clip_state`` -* ``set_constant_buffer`` -* ``set_framebuffer_state`` * ``set_polygon_stipple`` * ``set_scissor_state`` * ``set_viewport_state`` -* ``set_fragment_sampler_textures`` -* ``set_vertex_sampler_textures`` -* ``set_vertex_buffers`` * ``set_vertex_elements`` + +Clearing +^^^^^^^^ + +``clear`` initializes some or all of the surfaces currently bound to +the framebuffer to particular RGBA, depth, or stencil values. + +Clear is one of the most difficult concepts to nail down to a single +interface and it seems likely that we will want to add additional +clear paths, for instance clearing surfaces not bound to the +framebuffer, or read-modify-write clears such as depth-only or +stencil-only clears of packed depth-stencil buffers. + + +Drawing +^^^^^^^ + +``draw_arrays`` + +``draw_elements`` + +``draw_range_elements`` + + Queries ^^^^^^^ +Queries gather some statistic from the 3D pipeline over one or more +draws. Queries may be nested, though no state tracker currently +exercises this. + Queries can be created with ``create_query`` and deleted with ``destroy_query``. To enable a query, use ``begin_query``, and when finished, use ``end_query`` to stop the query. Finally, ``get_query_result`` is used to retrieve the results. -VBO Drawing -^^^^^^^^^^^ +Flushing +^^^^^^^^ -``draw_arrays`` +``flush`` -``draw_elements`` -``draw_range_elements`` +Resource Busy Queries +^^^^^^^^^^^^^^^^^^^^^ -``flush`` +``is_texture_referenced`` -Surface Drawing -^^^^^^^^^^^^^^^ +``is_buffer_referenced`` + + + +Blitting +^^^^^^^^ These methods emulate classic blitter controls. They are not guaranteed to be available; if they are set to NULL, then they are not present. +These methods operate directly on ``pipe_surface`` objects, and stand +apart from any 3D state in the context. Blitting functionality may be +moved to a separate abstraction at some point in the future. + ``surface_fill`` performs a fill operation on a section of a surface. ``surface_copy`` blits a region of a surface to a region of another surface, provided that both surfaces are the same format. The source and destination may be the same surface, and overlapping blits are permitted. -``clear`` initializes entire buffers to an RGBA, depth, or stencil value, -depending on the formats of the buffers. Use ``set_framebuffer_state`` to -specify the buffers to clear. +The interfaces to these calls are likely to change to make it easier +for a driver to batch multiple blits with the same source and +destination. + diff --git a/src/gallium/docs/build/html/_sources/tgsi.txt b/src/gallium/docs/build/html/_sources/tgsi.txt index 2474925..de27d8a 100644 --- a/src/gallium/docs/build/html/_sources/tgsi.txt +++ b/src/gallium/docs/build/html/_sources/tgsi.txt @@ -5,3 +5,1183 @@ TGSI, Tungsten Graphics Shader Instructions, is an intermediate language for describing shaders. Since Gallium is inherently shaderful, shaders are an important part of the API. TGSI is the only intermediate representation used by all drivers. + +From GL_NV_vertex_program +------------------------- + + +ARL - Address Register Load + +.. math:: + + dst.x = \lfloor src.x\rfloor + + dst.y = \lfloor src.y\rfloor + + dst.z = \lfloor src.z\rfloor + + dst.w = \lfloor src.w\rfloor + + +MOV - Move + +.. math:: + + dst.x = src.x + + dst.y = src.y + + dst.z = src.z + + dst.w = src.w + + +LIT - Light Coefficients + +.. math:: + + dst.x = 1 + + dst.y = max(src.x, 0) + + dst.z = (src.x > 0) ? max(src.y, 0)^{clamp(src.w, -128, 128))} : 0 + + dst.w = 1 + + +RCP - Reciprocal + +.. math:: + + dst.x = \frac{1}{src.x} + + dst.y = \frac{1}{src.x} + + dst.z = \frac{1}{src.x} + + dst.w = \frac{1}{src.x} + + +RSQ - Reciprocal Square Root + +.. math:: + + dst.x = \frac{1}{\sqrt{|src.x|}} + + dst.y = \frac{1}{\sqrt{|src.x|}} + + dst.z = \frac{1}{\sqrt{|src.x|}} + + dst.w = \frac{1}{\sqrt{|src.x|}} + + +EXP - Approximate Exponential Base 2 + +.. math:: + + dst.x = 2^{\lfloor src.x\rfloor} + + dst.y = src.x - \lfloor src.x\rfloor + + dst.z = 2^{src.x} + + dst.w = 1 + + +LOG - Approximate Logarithm Base 2 + +.. math:: + + dst.x = \lfloor\log_2{|src.x|}\rfloor + + dst.y = \frac{|src.x|}{2^{\lfloor\log_2{|src.x|}\rfloor}} + + dst.z = \log_2{|src.x|} + + dst.w = 1 + + +MUL - Multiply + +.. math:: + + dst.x = src0.x \times src1.x + + dst.y = src0.y \times src1.y + + dst.z = src0.z \times src1.z + + dst.w = src0.w \times src1.w + + +ADD - Add + +.. math:: + + dst.x = src0.x + src1.x + + dst.y = src0.y + src1.y + + dst.z = src0.z + src1.z + + dst.w = src0.w + src1.w + + +DP3 - 3-component Dot Product + +.. math:: + + dst.x = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + + dst.y = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + + dst.z = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + + dst.w = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + + +DP4 - 4-component Dot Product + +.. math:: + + dst.x = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w + + dst.y = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w + + dst.z = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w + + dst.w = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w + + +DST - Distance Vector + +.. math:: + + dst.x = 1 + + dst.y = src0.y \times src1.y + + dst.z = src0.z + + dst.w = src1.w + + +MIN - Minimum + +.. math:: + + dst.x = min(src0.x, src1.x) + + dst.y = min(src0.y, src1.y) + + dst.z = min(src0.z, src1.z) + + dst.w = min(src0.w, src1.w) + + +MAX - Maximum + +.. math:: + + dst.x = max(src0.x, src1.x) + + dst.y = max(src0.y, src1.y) + + dst.z = max(src0.z, src1.z) + + dst.w = max(src0.w, src1.w) + + +SLT - Set On Less Than + +.. math:: + + dst.x = (src0.x < src1.x) ? 1 : 0 + + dst.y = (src0.y < src1.y) ? 1 : 0 + + dst.z = (src0.z < src1.z) ? 1 : 0 + + dst.w = (src0.w < src1.w) ? 1 : 0 + + +SGE - Set On Greater Equal Than + +.. math:: + + dst.x = (src0.x >= src1.x) ? 1 : 0 + + dst.y = (src0.y >= src1.y) ? 1 : 0 + + dst.z = (src0.z >= src1.z) ? 1 : 0 + + dst.w = (src0.w >= src1.w) ? 1 : 0 + + +MAD - Multiply And Add + +.. math:: + + dst.x = src0.x \times src1.x + src2.x + + dst.y = src0.y \times src1.y + src2.y + + dst.z = src0.z \times src1.z + src2.z + + dst.w = src0.w \times src1.w + src2.w + + +SUB - Subtract + +.. math:: + + dst.x = src0.x - src1.x + + dst.y = src0.y - src1.y + + dst.z = src0.z - src1.z + + dst.w = src0.w - src1.w + + +LRP - Linear Interpolate + +.. math:: + + dst.x = src0.x \times (src1.x - src2.x) + src2.x + + dst.y = src0.y \times (src1.y - src2.y) + src2.y + + dst.z = src0.z \times (src1.z - src2.z) + src2.z + + dst.w = src0.w \times (src1.w - src2.w) + src2.w + + +CND - Condition + +.. math:: + + dst.x = (src2.x > 0.5) ? src0.x : src1.x + + dst.y = (src2.y > 0.5) ? src0.y : src1.y + + dst.z = (src2.z > 0.5) ? src0.z : src1.z + + dst.w = (src2.w > 0.5) ? src0.w : src1.w + + +DP2A - 2-component Dot Product And Add + +.. math:: + + dst.x = src0.x \times src1.x + src0.y \times src1.y + src2.x + + dst.y = src0.x \times src1.x + src0.y \times src1.y + src2.x + + dst.z = src0.x \times src1.x + src0.y \times src1.y + src2.x + + dst.w = src0.x \times src1.x + src0.y \times src1.y + src2.x + + +FRAC - Fraction + +.. math:: + + dst.x = src.x - \lfloor src.x\rfloor + + dst.y = src.y - \lfloor src.y\rfloor + + dst.z = src.z - \lfloor src.z\rfloor + + dst.w = src.w - \lfloor src.w\rfloor + + +CLAMP - Clamp + +.. math:: + + dst.x = clamp(src0.x, src1.x, src2.x) + + dst.y = clamp(src0.y, src1.y, src2.y) + + dst.z = clamp(src0.z, src1.z, src2.z) + + dst.w = clamp(src0.w, src1.w, src2.w) + + +FLR - Floor + +This is identical to ARL. + +.. math:: + + dst.x = \lfloor src.x\rfloor + + dst.y = \lfloor src.y\rfloor + + dst.z = \lfloor src.z\rfloor + + dst.w = \lfloor src.w\rfloor + + +ROUND - Round + +.. math:: + + dst.x = round(src.x) + + dst.y = round(src.y) + + dst.z = round(src.z) + + dst.w = round(src.w) + + +EX2 - Exponential Base 2 + +.. math:: + + dst.x = 2^{src.x} + + dst.y = 2^{src.x} + + dst.z = 2^{src.x} + + dst.w = 2^{src.x} + + +LG2 - Logarithm Base 2 + +.. math:: + + dst.x = \log_2{src.x} + + dst.y = \log_2{src.x} + + dst.z = \log_2{src.x} + + dst.w = \log_2{src.x} + + +POW - Power + +.. math:: + + dst.x = src0.x^{src1.x} + + dst.y = src0.x^{src1.x} + + dst.z = src0.x^{src1.x} + + dst.w = src0.x^{src1.x} + +XPD - Cross Product + +.. math:: + + dst.x = src0.y \times src1.z - src1.y \times src0.z + + dst.y = src0.z \times src1.x - src1.z \times src0.x + + dst.z = src0.x \times src1.y - src1.x \times src0.y + + dst.w = 1 + + +ABS - Absolute + +.. math:: + + dst.x = |src.x| + + dst.y = |src.y| + + dst.z = |src.z| + + dst.w = |src.w| + + +RCC - Reciprocal Clamped + +XXX cleanup on aisle three + +.. math:: + + dst.x = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020) + + dst.y = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020) + + dst.z = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020) + + dst.w = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020) + + +DPH - Homogeneous Dot Product + +.. math:: + + dst.x = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w + + dst.y = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w + + dst.z = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w + + dst.w = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w + + +COS - Cosine + +.. math:: + + dst.x = \cos{src.x} + + dst.y = \cos{src.x} + + dst.z = \cos{src.x} + + dst.w = \cos{src.w} + + +DDX - Derivative Relative To X + +.. math:: + + dst.x = partialx(src.x) + + dst.y = partialx(src.y) + + dst.z = partialx(src.z) + + dst.w = partialx(src.w) + + +DDY - Derivative Relative To Y + +.. math:: + + dst.x = partialy(src.x) + + dst.y = partialy(src.y) + + dst.z = partialy(src.z) + + dst.w = partialy(src.w) + + +KILP - Predicated Discard + + discard + + +PK2H - Pack Two 16-bit Floats + + TBD + + +PK2US - Pack Two Unsigned 16-bit Scalars + + TBD + + +PK4B - Pack Four Signed 8-bit Scalars + + TBD + + +PK4UB - Pack Four Unsigned 8-bit Scalars + + TBD + + +RFL - Reflection Vector + +.. math:: + + dst.x = 2 \times (src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z) / (src0.x \times src0.x + src0.y \times src0.y + src0.z \times src0.z) \times src0.x - src1.x + + dst.y = 2 \times (src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z) / (src0.x \times src0.x + src0.y \times src0.y + src0.z \times src0.z) \times src0.y - src1.y + + dst.z = 2 \times (src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z) / (src0.x \times src0.x + src0.y \times src0.y + src0.z \times src0.z) \times src0.z - src1.z + + dst.w = 1 + +Considered for removal. + + +SEQ - Set On Equal + +.. math:: + + dst.x = (src0.x == src1.x) ? 1 : 0 + dst.y = (src0.y == src1.y) ? 1 : 0 + dst.z = (src0.z == src1.z) ? 1 : 0 + dst.w = (src0.w == src1.w) ? 1 : 0 + + +SFL - Set On False + +.. math:: + + dst.x = 0 + dst.y = 0 + dst.z = 0 + dst.w = 0 + +Considered for removal. + +SGT - Set On Greater Than + +.. math:: + + dst.x = (src0.x > src1.x) ? 1 : 0 + dst.y = (src0.y > src1.y) ? 1 : 0 + dst.z = (src0.z > src1.z) ? 1 : 0 + dst.w = (src0.w > src1.w) ? 1 : 0 + + +SIN - Sine + +.. math:: + + dst.x = \sin{src.x} + + dst.y = \sin{src.x} + + dst.z = \sin{src.x} + + dst.w = \sin{src.w} + + +SLE - Set On Less Equal Than + +.. math:: + + dst.x = (src0.x <= src1.x) ? 1 : 0 + dst.y = (src0.y <= src1.y) ? 1 : 0 + dst.z = (src0.z <= src1.z) ? 1 : 0 + dst.w = (src0.w <= src1.w) ? 1 : 0 + + +SNE - Set On Not Equal + +.. math:: + + dst.x = (src0.x != src1.x) ? 1 : 0 + dst.y = (src0.y != src1.y) ? 1 : 0 + dst.z = (src0.z != src1.z) ? 1 : 0 + dst.w = (src0.w != src1.w) ? 1 : 0 + + +STR - Set On True + +.. math:: + + dst.x = 1 + dst.y = 1 + dst.z = 1 + dst.w = 1 + + +TEX - Texture Lookup + + TBD + + +TXD - Texture Lookup with Derivatives + + TBD + + +TXP - Projective Texture Lookup + + TBD + + +UP2H - Unpack Two 16-Bit Floats + + TBD + + Considered for removal. + +UP2US - Unpack Two Unsigned 16-Bit Scalars + + TBD + + Considered for removal. + +UP4B - Unpack Four Signed 8-Bit Values + + TBD + + Considered for removal. + +UP4UB - Unpack Four Unsigned 8-Bit Scalars + + TBD + + Considered for removal. + +X2D - 2D Coordinate Transformation + +.. math:: + + dst.x = src0.x + src1.x \times src2.x + src1.y \times src2.y + dst.y = src0.y + src1.x \times src2.z + src1.y \times src2.w + dst.z = src0.x + src1.x \times src2.x + src1.y \times src2.y + dst.w = src0.y + src1.x \times src2.z + src1.y \times src2.w + +Considered for removal. + + +GL_NV_vertex_program2 +-------------------------- + + +ARA - Address Register Add + + TBD + + Considered for removal. + +ARR - Address Register Load With Round + +.. math:: + + dst.x = round(src.x) + + dst.y = round(src.y) + + dst.z = round(src.z) + + dst.w = round(src.w) + + +BRA - Branch + + pc = target + + Considered for removal. + +CAL - Subroutine Call + + push(pc) + pc = target + + +RET - Subroutine Call Return + + pc = pop() + + Potential restrictions: + \times Only occurs at end of function. + +SSG - Set Sign + +.. math:: + + dst.x = (src.x > 0) ? 1 : (src.x < 0) ? -1 : 0 + + dst.y = (src.y > 0) ? 1 : (src.y < 0) ? -1 : 0 + + dst.z = (src.z > 0) ? 1 : (src.z < 0) ? -1 : 0 + + dst.w = (src.w > 0) ? 1 : (src.w < 0) ? -1 : 0 + + +CMP - Compare + +.. math:: + + dst.x = (src0.x < 0) ? src1.x : src2.x + + dst.y = (src0.y < 0) ? src1.y : src2.y + + dst.z = (src0.z < 0) ? src1.z : src2.z + + dst.w = (src0.w < 0) ? src1.w : src2.w + + +KIL - Conditional Discard + +.. math:: + + if (src.x < 0 || src.y < 0 || src.z < 0 || src.w < 0) + discard + endif + + +SCS - Sine Cosine + +.. math:: + + dst.x = \cos{src.x} + + dst.y = \sin{src.x} + + dst.z = 0 + + dst.y = 1 + + +TXB - Texture Lookup With Bias + + TBD + + +NRM - 3-component Vector Normalise + +.. math:: + + dst.x = src.x / (src.x \times src.x + src.y \times src.y + src.z \times src.z) + + dst.y = src.y / (src.x \times src.x + src.y \times src.y + src.z \times src.z) + + dst.z = src.z / (src.x \times src.x + src.y \times src.y + src.z \times src.z) + + dst.w = 1 + + +DIV - Divide + +.. math:: + + dst.x = \frac{src0.x}{src1.x} + + dst.y = \frac{src0.y}{src1.y} + + dst.z = \frac{src0.z}{src1.z} + + dst.w = \frac{src0.w}{src1.w} + + +DP2 - 2-component Dot Product + +.. math:: + + dst.x = src0.x \times src1.x + src0.y \times src1.y + + dst.y = src0.x \times src1.x + src0.y \times src1.y + + dst.z = src0.x \times src1.x + src0.y \times src1.y + + dst.w = src0.x \times src1.x + src0.y \times src1.y + + +TXL - Texture Lookup With LOD + + TBD + + +BRK - Break + + TBD + + +IF - If + + TBD + + +BGNFOR - Begin a For-Loop + + dst.x = floor(src.x) + dst.y = floor(src.y) + dst.z = floor(src.z) + + if (dst.y <= 0) + pc = [matching ENDFOR] + 1 + endif + + Note: The destination must be a loop register. + The source must be a constant register. + + Considered for cleanup / removal. + + +REP - Repeat + + TBD + + +ELSE - Else + + TBD + + +ENDIF - End If + + TBD + + +ENDFOR - End a For-Loop + + dst.x = dst.x + dst.z + dst.y = dst.y - 1.0 + + if (dst.y > 0) + pc = [matching BGNFOR instruction] + 1 + endif + + Note: The destination must be a loop register. + + Considered for cleanup / removal. + +ENDREP - End Repeat + + TBD + + +PUSHA - Push Address Register On Stack + + push(src.x) + push(src.y) + push(src.z) + push(src.w) + + Considered for cleanup / removal. + +POPA - Pop Address Register From Stack + + dst.w = pop() + dst.z = pop() + dst.y = pop() + dst.x = pop() + + Considered for cleanup / removal. + + +GL_NV_gpu_program4 +------------------------ + +Support for these opcodes indicated by a special pipe capability bit (TBD). + +CEIL - Ceiling + +.. math:: + + dst.x = \lceil src.x\rceil + + dst.y = \lceil src.y\rceil + + dst.z = \lceil src.z\rceil + + dst.w = \lceil src.w\rceil + + +I2F - Integer To Float + +.. math:: + + dst.x = (float) src.x + + dst.y = (float) src.y + + dst.z = (float) src.z + + dst.w = (float) src.w + + +NOT - Bitwise Not + +.. math:: + + dst.x = ~src.x + + dst.y = ~src.y + + dst.z = ~src.z + + dst.w = ~src.w + + +TRUNC - Truncate + +XXX how is this different from floor? + +.. math:: + + dst.x = trunc(src.x) + + dst.y = trunc(src.y) + + dst.z = trunc(src.z) + + dst.w = trunc(src.w) + + +SHL - Shift Left + +.. math:: + + dst.x = src0.x << src1.x + + dst.y = src0.y << src1.x + + dst.z = src0.z << src1.x + + dst.w = src0.w << src1.x + + +SHR - Shift Right + +.. math:: + + dst.x = src0.x >> src1.x + + dst.y = src0.y >> src1.x + + dst.z = src0.z >> src1.x + + dst.w = src0.w >> src1.x + + +AND - Bitwise And + +.. math:: + + dst.x = src0.x & src1.x + + dst.y = src0.y & src1.y + + dst.z = src0.z & src1.z + + dst.w = src0.w & src1.w + + +OR - Bitwise Or + +.. math:: + + dst.x = src0.x | src1.x + + dst.y = src0.y | src1.y + + dst.z = src0.z | src1.z + + dst.w = src0.w | src1.w + + +MOD - Modulus + +.. math:: + + dst.x = src0.x \bmod src1.x + + dst.y = src0.y \bmod src1.y + + dst.z = src0.z \bmod src1.z + + dst.w = src0.w \bmod src1.w + + +XOR - Bitwise Xor + +.. math:: + + dst.x = src0.x ^ src1.x + + dst.y = src0.y ^ src1.y + + dst.z = src0.z ^ src1.z + + dst.w = src0.w ^ src1.w + + +SAD - Sum Of Absolute Differences + +.. math:: + + dst.x = |src0.x - src1.x| + src2.x + + dst.y = |src0.y - src1.y| + src2.y + + dst.z = |src0.z - src1.z| + src2.z + + dst.w = |src0.w - src1.w| + src2.w + + +TXF - Texel Fetch + + TBD + + +TXQ - Texture Size Query + + TBD + + +CONT - Continue + + TBD + + +GL_NV_geometry_program4 +----------------------------- + + +EMIT - Emit + + TBD + + +ENDPRIM - End Primitive + + TBD + + +GLSL +---------- + + +BGNLOOP - Begin a Loop + + TBD + + +BGNSUB - Begin Subroutine + + TBD + + +ENDLOOP - End a Loop + + TBD + + +ENDSUB - End Subroutine + + TBD + + + +NOP - No Operation + + Do nothing. + +NRM4 - 4-component Vector Normalise + +.. math:: + + dst.x = \frac{src.x}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w} + + dst.y = \frac{src.y}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w} + + dst.z = \frac{src.z}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w} + + dst.w = \frac{src.w}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w} + + +ps_2_x +------------ + + +CALLNZ - Subroutine Call If Not Zero + + TBD + + +IFC - If + + TBD + + +BREAKC - Break Conditional + + TBD + + +Explanation of symbols used +============================== + + +Functions +-------------- + + + :math:`|x|` Absolute value of `x`. + + :math:`\lceil x \rceil` Ceiling of `x`. + + clamp(x,y,z) Clamp x between y and z. + (x < y) ? y : (x > z) ? z : x + + :math:`\lfloor x\rfloor` Floor of `x`. + + :math:`\log_2{x}` Logarithm of `x`, base 2. + + max(x,y) Maximum of x and y. + (x > y) ? x : y + + min(x,y) Minimum of x and y. + (x < y) ? x : y + + partialx(x) Derivative of x relative to fragment's X. + + partialy(x) Derivative of x relative to fragment's Y. + + pop() Pop from stack. + + :math:`x^y` `x` to the power `y`. + + push(x) Push x on stack. + + round(x) Round x. + + trunc(x) Truncate x. + + +Keywords +------------- + + + discard Discard fragment. + + dst First destination register. + + dst0 First destination register. + + pc Program counter. + + src First source register. + + src0 First source register. + + src1 Second source register. + + src2 Third source register. + + target Label of target instruction. + + +Other tokens +=============== + + +Declaration Semantic +------------------------- + + + Follows Declaration token if Semantic bit is set. + + Since its purpose is to link a shader with other stages of the pipeline, + it is valid to follow only those Declaration tokens that declare a register + either in INPUT or OUTPUT file. + + SemanticName field contains the semantic name of the register being declared. + There is no default value. + + SemanticIndex is an optional subscript that can be used to distinguish + different register declarations with the same semantic name. The default value + is 0. + + The meanings of the individual semantic names are explained in the following + sections. + + +FACE +^^^^ + + Valid only in a fragment shader INPUT declaration. + + FACE.x is negative when the primitive is back facing. FACE.x is positive + when the primitive is front facing. diff --git a/src/gallium/docs/build/html/context.html b/src/gallium/docs/build/html/context.html index bd8166a..21bab45 100644 --- a/src/gallium/docs/build/html/context.html +++ b/src/gallium/docs/build/html/context.html @@ -68,6 +68,18 @@ fragment samplers, and they are bound in groups. fragment shaders, and *_vs_state is for vertex shaders. +
+

Resource Binding State¶

+

This state describes how resources in various flavours (textures, +buffers, surfaces) are bound to the driver.

+ +

Non-CSO State¶

These pieces of state are too small, variable, and/or trivial to have CSO @@ -77,42 +89,61 @@ objects. They all follow simple, one-method binding calls, e.g.

  • set_edgeflags
  • set_blend_color
  • set_clip_state
  • -
  • set_constant_buffer
  • -
  • set_framebuffer_state
  • set_polygon_stipple
  • set_scissor_state
  • set_viewport_state
  • -
  • set_fragment_sampler_textures
  • -
  • set_vertex_sampler_textures
  • -
  • set_vertex_buffers
  • set_vertex_elements
  • +
    +

    Clearing¶

    +

    clear initializes some or all of the surfaces currently bound to +the framebuffer to particular RGBA, depth, or stencil values.

    +

    Clear is one of the most difficult concepts to nail down to a single +interface and it seems likely that we will want to add additional +clear paths, for instance clearing surfaces not bound to the +framebuffer, or read-modify-write clears such as depth-only or +stencil-only clears of packed depth-stencil buffers.

    +
    +
    +

    Drawing¶

    +

    draw_arrays

    +

    draw_elements

    +

    draw_range_elements

    +

    Queries¶

    +

    Queries gather some statistic from the 3D pipeline over one or more +draws. Queries may be nested, though no state tracker currently +exercises this.

    Queries can be created with create_query and deleted with destroy_query. To enable a query, use begin_query, and when finished, use end_query to stop the query. Finally, get_query_result is used to retrieve the results.

    -
    -

    VBO Drawing¶

    -

    draw_arrays

    -

    draw_elements

    -

    draw_range_elements

    +
    +

    Flushing¶

    flush

    -
    -

    Surface Drawing¶

    +
    +

    Resource Busy Queries¶

    +

    is_texture_referenced

    +

    is_buffer_referenced

    +
    +
    +

    Blitting¶

    These methods emulate classic blitter controls. They are not guaranteed to be available; if they are set to NULL, then they are not present.

    +

    These methods operate directly on pipe_surface objects, and stand +apart from any 3D state in the context. Blitting functionality may be +moved to a separate abstraction at some point in the future.

    surface_fill performs a fill operation on a section of a surface.

    surface_copy blits a region of a surface to a region of another surface, provided that both surfaces are the same format. The source and destination may be the same surface, and overlapping blits are permitted.

    -

    clear initializes entire buffers to an RGBA, depth, or stencil value, -depending on the formats of the buffers. Use set_framebuffer_state to -specify the buffers to clear.

    +

    The interfaces to these calls are likely to change to make it easier +for a driver to batch multiple blits with the same source and +destination.

    @@ -128,10 +159,14 @@ specify the buffers to clear.

  • Context diff --git a/src/gallium/docs/build/html/index.html b/src/gallium/docs/build/html/index.html index 2001ba5..a01603f 100644 --- a/src/gallium/docs/build/html/index.html +++ b/src/gallium/docs/build/html/index.html @@ -49,7 +49,24 @@
  • What is Gallium?
  • -
  • TGSI
  • +
  • TGSI +
  • +
  • Explanation of symbols used +
  • +
  • Other tokens +
  • Screen diff --git a/src/gallium/docs/build/html/searchindex.js b/src/gallium/docs/build/html/searchindex.js index 08f2b40..a2836ca 100644 --- a/src/gallium/docs/build/html/searchindex.js +++ b/src/gallium/docs/build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({desctypes:{},terms:{represent:4,all:[4,9,11],edg:2,queri:9,four:10,per:5,abil:9,follow:9,depend:[5,9],intermedi:4,sourc:9,straightforward:7,set_vertex_el:9,fan:5,level:10,list:6,emul:9,prefilt:10,small:9,dimens:10,impli:5,second:[5,11],pass:[1,11],light_twosid:5,zfail_op:11,index:0,what:[0,7,8],sprite_coord_mod:5,section:9,access:9,delet:9,rgba:[9,10],method:[0,3,9],themselv:5,inher:4,vertic:5,sinc:4,valu:[9,11],line_stipple_factor:5,search:0,vbo:9,shader:[0,1,4,5,6,9,11],permit:[5,9],chang:5,gourard:5,primit:5,modul:0,"boolean":3,visibl:5,oval:5,unit:10,encapsul:7,gl_rasterization_rul:5,from:[5,10],offset_unit:5,two:[6,9,11],call:9,get_paramf:3,type:6,desir:1,get_nam:3,raster:[0,1,5,9],pipe_primitive_quad:5,flag:5,templat:3,fill_ccw:5,point_size_min:5,poly_smooth:5,graphic:[4,7],retriev:9,setup:3,work:1,obvious:5,can:[1,3,9],control:[11,8,5,9,10],create_blend_st:9,indic:0,minimum:[5,10],alwai:[11,5,10],point_size_per_vertex:5,multipl:2,anoth:9,write:[7,11],how:[5,10],flatshad:[1,5],simpl:9,after:10,cso:[0,1,9],set_constant_buff:9,mai:[5,9],fail_op:11,pipe_stencil_op:11,principl:1,essenti:7,bind:9,element:5,inform:2,valuemask:11,order:11,rotat:5,through:[5,11],still:5,paramet:3,group:9,directli:9,bypass:5,main:5,pixel:5,non:9,"return":[1,3],thei:[1,11,5,9,10],fragment:[8,5,9,11],initi:9,get_vendor:3,line_smooth:5,cull_mod:5,introduct:[0,7],name:[3,9],token:6,each:[5,10],side:11,doxi:10,offset_ccw:5,clamp:10,chunk:5,special:9,out:[1,11,10],variabl:9,content:0,hardwar:[7,5,11],got:3,offset_cw:5,given:3,compare_func:10,begin_queri:9,"_rasterizer_st":9,reusabl:1,filter:10,turn:5,get_param:3,clump:11,first:5,oper:[9,11],rang:10,max_lod:10,render:[8,9],carri:11,independ:3,instruct:4,done:11,size:5,differ:5,stencil:[0,1,9,11],tradition:11,too:9,circl:5,scheme:9,moar:[3,5],store:11,min_img_filt:10,option:[5,10],pipe_tex_filt:10,specifi:[5,9],create_queri:9,part:[1,4,3],line_stipple_en:5,target:8,provid:[7,9],see:3,structur:11,texel:10,stippl:5,opaqu:1,result:[8,9],pre:5,fashion:7,clip:5,ani:1,"_blend_stat":9,bitfield:5,max_anisotropi:10,manner:[3,7],have:[11,5,9,10],tabl:0,need:5,"null":9,techniqu:2,unresolv:8,alias:[2,5],destroi:9,fill_cw:5,note:[1,5],take:2,set_viewport_st:9,pipe_func:11,pipelin:[5,9],shade:5,normal:10,buffer:[2,8,9,11],object:[1,7,3,9],most:[5,9],mipmap:10,alpha:[0,1,9,11],pipe_primitive_polygon:5,segment:5,tradit:10,clear:9,tgsi:[0,4],determin:5,blend:[0,1,8,9],end_queri:9,destroy_blend_st:9,wrap_:10,trivial:9,onli:4,front_wind:5,point_sprit:5,should:[8,5],get:3,set_scissor_st:9,stop:9,tungsten:4,tgsi_token:6,set_fragment_sampler_textur:9,enabl:[5,9,11],draw_el:9,pipe_primitive_triangle_fan:5,anisotrop:10,set:[5,9,10],set_framebuffer_st:9,smooth:[2,5],msaa:[2,5],wrap_t:10,wrap_r:10,fail:11,purest:9,pattern:5,state:[1,5,8,9,10,11],"import":[4,5],awai:5,triplet:9,screen:[0,3],min_mip_filt:10,entir:[5,9],lod_bia:10,both:[9,11],last:5,region:9,"_fs_state":9,min_lod:10,context:[0,1,3,9],line_last_pixel:5,mani:10,destroy_queri:9,load:10,undocu:[8,5,10],point:[3,5],color:[5,10],anti:[2,5],provok:5,devic:[3,7,9],three:11,been:11,get_query_result:9,treat:10,basic:2,sprite:5,normalized_coord:10,xxx:[3,11,8,5,10],coordin:10,minifi:10,togeth:11,func:11,present:9,multi:2,servic:7,properti:1,rectangular:5,behavior:8,glossari:[2,0],blit:9,set_edgeflag:9,destin:9,"_vs_state":9,sever:[7,5],set_blend_color:9,surface_fil:9,welcom:0,bind_fragment_sampler_st:9,perform:9,same:9,member:[1,5,6,8,10,11],handl:[1,9],compare_mod:10,zpass_op:11,document:[0,11],finish:9,driver:[4,7],effect:[1,5,10],refin:10,weird:10,multisampl:5,off:[8,5],center:5,surface_copi:9,scissor:5,exampl:9,poly_stipple_en:5,thi:[2,8,5,10],interpol:5,set_clip_st:9,dimension:10,usual:5,identifi:3,execut:11,tcl:5,simpli:5,languag:4,expos:10,except:5,sampler:[0,1,9,10],bypass_vs_clip_and_viewport:[1,5],pipe_tex_wrap:10,vendor:3,which:[1,7],format:[3,9],agnost:7,piec:9,bia:10,magnifi:10,amp:11,bit:5,specif:[1,3,9,5],integ:3,point_siz:5,api:[1,4,7,10],either:9,page:0,mag_img_filt:10,pipe_primitive_quad_strip:5,draw_range_el:9,some:10,back:3,sampl:[2,10],flush:9,guarante:9,bore:3,textur:[3,10],overlap:9,point_smooth:5,larg:7,select:10,refer:[11,10],core:[1,7],run:5,border_color:10,"_depth_stencil_alpha_st":9,appli:10,describ:4,writemask:11,actual:[5,11],gallium:[0,1,4,7,6],bind_vertex_sampler_st:9,set_vertex_buff:9,discard:11,disabl:10,"final":[8,9],"float":3,bound:[1,9,10],wrap:10,mere:5,flatshade_first:[1,5],lod:10,support:6,transform:5,avail:9,width:5,set_polygon_stippl:9,individu:10,"function":11,blend_en:8,set_vertex_sampler_textur:9,point_size_max:5,line:5,viewport:5,notat:10,draw_arrai:9,whether:[11,5,10],wish:5,caller:5,bind_blend_st:9,maximum:[5,10],line_stipple_pattern:5,offset_scal:5,constant:1,creat:[1,3,9],classic:9,certain:11,dure:11,repres:[3,9],implement:5,fill:[1,9],polygon:[2,5],when:[5,9,10],detail:10,test:[5,11],ref_valu:11,draw:9,is_format_support:3,vertex:[5,9],surfac:9,receiv:11,blitter:9,algorithm:5,rule:5,depth:[2,0,1,9,11],time:1,line_width:5,texture_cr:3},titles:["Welcome to Gallium’s documentation!","CSO","Glossary","Screen","TGSI","Rasterizer","Shader","Introduction","Blend","Context","Sampler","Depth, Stencil, & Alpha"],modules:{},descrefs:{},filenames:["index","cso","glossary","screen","tgsi","cso/rasterizer","cso/shader","intro","cso/blend","context","cso/sampler","cso/dsa"]}) \ No newline at end of file +Search.setIndex({desctypes:{},terms:{represent:4,all:[4,9,11],concept:9,edg:2,queri:[4,9],particular:9,four:[4,10],scalar:4,per:5,abil:9,follow:[4,9],depend:5,name:[3,4,9],intermedi:4,ps_2_x:[0,4],those:4,logarithm:4,sourc:[4,9],normalis:4,straightforward:7,fals:4,set_vertex_el:9,lrp:4,fan:5,partialx:4,level:10,pk4b:4,list:6,emul:9,prefilt:10,cosin:4,sine:4,small:9,div:4,round:4,cmp:4,dimens:10,impli:5,flr:4,up4b:4,sign:4,tex:4,second:[4,5,11],pass:[1,11],light_twosid:5,zfail_op:11,index:0,what:[0,7,8],sprite_coord_mod:5,sub:4,compar:4,neg:4,section:[4,9],current:9,delet:9,rgba:[9,10],method:[0,3,9],themselv:5,deriv:4,absolut:4,coeffici:4,inher:4,path:9,vertic:5,modifi:9,sinc:4,valu:[4,9,11],trunc:4,line_stipple_factor:5,search:0,shift:4,vbo:[],shader:[0,1,4,5,6,9,11],permit:[5,9],weird:10,gourard:5,semant:[0,4],txl:4,"boolean":3,txf:4,modul:0,txd:4,sgt:4,textur:[3,4,9,10],src2:4,src0:4,api:[1,4,7,10],brk:4,is_texture_referenc:9,visibl:5,oval:5,sge:4,txq:4,encapsul:7,gl_rasterization_rul:5,from:[0,4,5,9,10],offset_unit:5,subtract:4,regist:4,two:[4,6,9,11],program:4,call:[4,9],get_paramf:3,stage:4,type:6,more:9,desir:1,get_nam:3,raster:[0,1,5,9],pipe_primitive_quad:5,flag:5,indic:[0,4],fill_ccw:5,unpack:4,point_size_min:5,must:4,poly_smooth:5,graphic:[4,7],retriev:9,setup:3,work:1,obvious:5,can:[1,4,3,9],cal:4,purpos:4,root:4,fetch:4,control:[11,8,5,9,10],create_blend_st:9,pipe_surfac:9,templat:3,minimum:[4,5,10],want:9,dp2a:4,unsign:4,occur:4,gl_nv_vertex_program:[0,4],alwai:[11,5,10],point_size_per_vertex:5,multipl:[2,9],divid:4,anoth:9,write:[7,9,11],how:[4,5,9,10],flatshad:[1,5],simpl:9,sin:4,"42101e":[],product:4,sne:4,resourc:9,max:4,after:10,cso:[0,1,9],set_constant_buff:9,mad:4,mai:[5,9],end:4,fail_op:11,pipe_stencil_op:11,principl:1,essenti:7,third:4,bind:9,counter:4,element:5,endprim:4,inform:2,valuemask:11,order:11,rotat:5,over:9,move:[4,9],through:[5,11],sqrt:[],still:5,paramet:3,group:9,directli:9,bypass:5,main:5,easier:9,non:9,"return":[1,4,3],greater:4,thei:[1,11,5,9,10],fragment:[4,8,5,9,11],initi:9,get_vendor:3,"break":4,line_smooth:5,cull_mod:5,front:4,nop:4,introduct:[0,7],"884467e":[],separ:9,token:[0,4,6],each:[5,10],side:11,doxi:10,offset_ccw:5,clamp:[4,10],chunk:5,continu:4,bra:4,frac:4,special:[4,9],out:[1,11,10],variabl:9,dst:4,ret:4,content:0,vector:4,rel:4,hardwar:[7,5,11],got:3,linear:4,offset_cw:5,given:3,compare_func:10,endsub:4,base:4,begin_queri:9,"_rasterizer_st":9,reusabl:1,endrep:4,filter:10,turn:5,get_param:3,clump:11,first:[4,5],oper:[4,9,11],glsl:[0,4],rang:10,max_lod:10,render:[8,9],carri:11,independ:3,restrict:4,clear:9,instruct:4,done:11,size:[4,5],differ:[4,5],stencil:[0,1,9,11],exponenti:4,tradition:11,too:9,circl:5,scheme:9,moar:[3,5],store:11,nrm4:4,min_img_filt:10,option:[4,5,10],pipe_tex_filt:10,specifi:5,create_queri:9,part:[1,4,3],than:4,line_stipple_en:5,target:[4,8],keyword:[0,4],provid:[7,9],remov:4,see:3,structur:11,texel:[4,10],stippl:5,str:4,opaqu:1,posit:4,result:[8,9],pre:5,fashion:7,clip:5,pk4ub:4,ani:[1,9],"_blend_stat":9,bitfield:5,subroutin:4,max_anisotropi:10,txb:4,manner:[3,7],have:[11,5,9,10],tabl:0,need:5,seem:9,"null":9,bitwis:4,techniqu:2,unresolv:8,alias:[2,5],destroi:9,fill_cw:5,note:[1,4,5],ex2:4,take:2,set_viewport_st:9,pipe_func:11,noth:4,singl:9,pipelin:[4,5,9],xor:4,shade:5,normal:10,buffer:[2,8,9,11],object:[1,7,3,9],most:[5,9],sfl:4,mipmap:10,alpha:[0,1,9,11],pipe_primitive_polygon:5,segment:5,tradit:10,pk2h:4,nail:9,tgsi:[0,4],face:4,pipe:4,declar:[0,4],determin:5,pk2u:4,left:4,blend:[0,1,8,9],sum:4,dot:4,end_queri:9,popa:4,destroy_blend_st:9,wrap_:10,dst0:4,trivial:9,access:9,onli:[4,9],dp4:4,dp3:4,dp2:4,front_wind:5,point_sprit:5,should:[8,5],busi:9,endloop:4,lit:4,variou:9,get:3,set_scissor_st:9,stop:9,ceil:4,mul:4,tungsten:4,ssg:4,tgsi_token:6,tbd:4,set_fragment_sampler_textur:9,shr:4,enabl:[5,9,11],draw_el:9,"default":4,statist:9,contain:4,anisotrop:10,shl:4,valid:4,dph:4,arr:4,set:[4,5,9,10],set_framebuffer_st:9,seq:4,smooth:[2,5],ara:4,msaa:[2,5],wrap_t:10,wrap_r:10,fail:11,arl:4,purest:9,modulu:4,project:4,pattern:5,label:4,state:[1,5,8,9,10,11],between:4,"import":[4,5],subscript:4,triplet:9,screen:[0,3],min_mip_filt:10,entir:5,is_buffer_referenc:9,lod_bia:10,addit:9,both:[9,11],last:5,framebuff:9,x2d:4,region:9,equal:4,min_lod:10,context:[0,1,3,9],line_last_pixel:5,mani:10,destroy_queri:9,load:[4,10],undocu:[8,5,10],point:[3,5,9],color:[5,10],pow:4,address:4,pop:4,distinguish:4,callnz:4,reciproc:4,anti:[2,5],provok:5,lg2:4,asdf:[],light:4,endif:4,devic:[3,7,9],three:[4,11],been:11,compon:4,get_query_result:9,treat:10,basic:2,bgnsub:4,up4ub:4,sprite:5,nrm:4,normalized_coord:10,xxx:[3,4,5,8,10,11],coordin:[4,10],zero:4,minifi:10,texture_cr:3,func:11,predic:4,bgnloop:4,sad:4,present:9,multi:2,ident:4,slt:4,servic:7,properti:1,batch:9,rectangular:5,behavior:8,glossari:[2,0],sle:4,loop:4,pack:[4,9],gl_nv_vertex_program2:[0,4],cont:4,set_edgeflag:9,endfor:4,destin:[4,9],unit:10,primit:[4,5],"_vs_state":9,sever:[7,5],set_blend_color:9,surface_fil:9,welcom:0,bind_fragment_sampler_st:9,perform:9,make:9,cross:4,same:[4,9],member:[1,5,6,8,10,11],handl:[1,9],compare_mod:10,instanc:9,zpass_op:11,document:[0,11],difficult:9,finish:9,nest:9,driver:[4,7,9],effect:[1,5,10],mov:4,capabl:4,rais:[],kil:4,stack:4,squar:4,multisampl:5,off:[8,5],center:5,surface_copi:9,min:4,aisl:4,scissor:5,exampl:9,reflect:4,poly_stipple_en:5,thi:[2,4,5,8,9,10],interpol:[4,5],set_clip_st:9,dimension:10,i2f:4,usual:5,explan:[0,4],distanc:4,identifi:3,execut:11,less:4,kilp:4,up2u:4,up2h:4,tcl:5,simpli:5,semanticnam:4,breakc:4,languag:4,begin:4,gl_nv_geometry_program4:[0,4],expos:10,except:5,add:[4,9],cleanup:4,exercis:9,sampler:[0,1,9,10],els:4,mod:4,bypass_vs_clip_and_viewport:[1,5],match:4,pipe_tex_wrap:10,vendor:3,which:[1,7],format:[3,9],read:9,agnost:7,piec:9,bia:[4,10],bgnfor:4,magnifi:10,amp:11,bit:[4,5],truncat:4,apart:9,like:9,specif:[1,3,9,5],integ:[3,4],point_siz:5,src1:4,either:[4,9],output:4,page:0,mag_img_filt:10,refin:10,pipe_primitive_quad_strip:5,right:4,draw_range_el:9,some:[9,10],blend_en:8,pusha:4,opcod:4,sampl:[2,10],flush:9,guarante:9,bore:3,pixel:5,ddy:4,ddx:4,partiali:4,though:9,overlap:9,point_smooth:5,multipli:4,cnd:4,tracker:9,larg:7,select:10,condit:4,txp:4,refer:[11,10],core:[1,7],run:5,rsq:4,border_color:10,ifc:4,"_depth_stencil_alpha_st":9,appli:10,describ:[4,9],writemask:11,src:4,actual:[5,11],gallium:[0,1,4,7,6],semanticindex:4,bind_vertex_sampler_st:9,set_vertex_buff:9,stand:9,awai:5,discard:[4,11],approxim:4,mean:4,disabl:10,"final":[8,9],"float":[3,4],bound:[1,9,10],down:9,explain:4,wrap:10,chang:[5,9],mere:5,flatshade_first:[1,5],log:4,lod:[4,10],support:[4,6],rcp:4,transform:[4,5],xpd:4,avail:9,width:5,set_polygon_stippl:9,interfac:9,fraction:4,individu:[4,10],rcc:4,"function":[0,4,9,11],homogen:4,back:[3,4],set_vertex_sampler_textur:9,point_size_max:5,link:4,blit:9,line:5,"true":4,viewport:5,gl_nv_gpu_program4:[0,4],notat:10,flavour:9,input:4,draw_arrai:9,whether:[11,5,10],wish:5,caller:5,bind_blend_st:9,maximum:[4,5,10],"abstract":9,line_stipple_pattern:5,emit:4,offset_scal:5,gather:9,constant:[1,4],creat:[1,3,9],classic:9,certain:11,dure:11,rfl:4,repres:[3,9],implement:5,file:4,fill:[1,9],polygon:[2,5],floor:4,when:[4,5,9,10],detail:10,power:4,field:4,other:[0,4],lookup:4,futur:9,branch:4,test:[5,11],ref_valu:11,draw:9,repeat:4,exp:4,is_format_support:3,symbol:[0,4],vertex:[5,9],surfac:9,consid:4,receiv:11,blitter:9,algorithm:5,rule:5,pipe_primitive_triangle_fan:5,depth:[2,0,1,9,11],"_fs_state":9,potenti:4,time:[1,4],push:4,line_width:5,rep:4,togeth:11},titles:["Welcome to Gallium’s documentation!","CSO","Glossary","Screen","TGSI","Rasterizer","Shader","Introduction","Blend","Context","Sampler","Depth, Stencil, & Alpha"],modules:{},descrefs:{},filenames:["index","cso","glossary","screen","tgsi","cso/rasterizer","cso/shader","intro","cso/blend","context","cso/sampler","cso/dsa"]}) \ No newline at end of file diff --git a/src/gallium/docs/build/html/tgsi.html b/src/gallium/docs/build/html/tgsi.html index ede551e..207607b 100644 --- a/src/gallium/docs/build/html/tgsi.html +++ b/src/gallium/docs/build/html/tgsi.html @@ -51,6 +51,823 @@ for describing shaders. Since Gallium is inherently shaderful, shaders are an important part of the API. TGSI is the only intermediate representation used by all drivers.

    +
    +

    From GL_NV_vertex_program¶

    +

    ARL - Address Register Load

    +
    +

    dst.x = \lfloor src.x\rfloor
+
+dst.y = \lfloor src.y\rfloor
+
+dst.z = \lfloor src.z\rfloor
+
+dst.w = \lfloor src.w\rfloor

    +

    MOV - Move

    +
    +

    dst.x = src.x
+
+dst.y = src.y
+
+dst.z = src.z
+
+dst.w = src.w

    +

    LIT - Light Coefficients

    +
    +

    dst.x = 1
+
+dst.y = max(src.x, 0)
+
+dst.z = (src.x > 0) ? max(src.y, 0)^{clamp(src.w, -128, 128))} : 0
+
+dst.w = 1

    +

    RCP - Reciprocal

    +
    +

    dst.x = \frac{1}{src.x}
+
+dst.y = \frac{1}{src.x}
+
+dst.z = \frac{1}{src.x}
+
+dst.w = \frac{1}{src.x}

    +

    RSQ - Reciprocal Square Root

    +
    +

    dst.x = \frac{1}{\sqrt{|src.x|}}
+
+dst.y = \frac{1}{\sqrt{|src.x|}}
+
+dst.z = \frac{1}{\sqrt{|src.x|}}
+
+dst.w = \frac{1}{\sqrt{|src.x|}}

    +

    EXP - Approximate Exponential Base 2

    +
    +

    dst.x = 2^{\lfloor src.x\rfloor}
+
+dst.y = src.x - \lfloor src.x\rfloor
+
+dst.z = 2^{src.x}
+
+dst.w = 1

    +

    LOG - Approximate Logarithm Base 2

    +
    +

    dst.x = \lfloor\log_2{|src.x|}\rfloor
+
+dst.y = \frac{|src.x|}{2^{\lfloor\log_2{|src.x|}\rfloor}}
+
+dst.z = \log_2{|src.x|}
+
+dst.w = 1

    +

    MUL - Multiply

    +
    +

    dst.x = src0.x \times src1.x
+
+dst.y = src0.y \times src1.y
+
+dst.z = src0.z \times src1.z
+
+dst.w = src0.w \times src1.w

    +

    ADD - Add

    +
    +

    dst.x = src0.x + src1.x
+
+dst.y = src0.y + src1.y
+
+dst.z = src0.z + src1.z
+
+dst.w = src0.w + src1.w

    +

    DP3 - 3-component Dot Product

    +
    +

    dst.x = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z
+
+dst.y = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z
+
+dst.z = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z
+
+dst.w = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z

    +

    DP4 - 4-component Dot Product

    +
    +

    dst.x = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w
+
+dst.y = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w
+
+dst.z = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w
+
+dst.w = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w

    +

    DST - Distance Vector

    +
    +

    dst.x = 1
+
+dst.y = src0.y \times src1.y
+
+dst.z = src0.z
+
+dst.w = src1.w

    +

    MIN - Minimum

    +
    +

    dst.x = min(src0.x, src1.x)
+
+dst.y = min(src0.y, src1.y)
+
+dst.z = min(src0.z, src1.z)
+
+dst.w = min(src0.w, src1.w)

    +

    MAX - Maximum

    +
    +

    dst.x = max(src0.x, src1.x)
+
+dst.y = max(src0.y, src1.y)
+
+dst.z = max(src0.z, src1.z)
+
+dst.w = max(src0.w, src1.w)

    +

    SLT - Set On Less Than

    +
    +

    dst.x = (src0.x < src1.x) ? 1 : 0
+
+dst.y = (src0.y < src1.y) ? 1 : 0
+
+dst.z = (src0.z < src1.z) ? 1 : 0
+
+dst.w = (src0.w < src1.w) ? 1 : 0

    +

    SGE - Set On Greater Equal Than

    +
    +

    dst.x = (src0.x >= src1.x) ? 1 : 0
+
+dst.y = (src0.y >= src1.y) ? 1 : 0
+
+dst.z = (src0.z >= src1.z) ? 1 : 0
+
+dst.w = (src0.w >= src1.w) ? 1 : 0

    +

    MAD - Multiply And Add

    +
    +

    dst.x = src0.x \times src1.x + src2.x
+
+dst.y = src0.y \times src1.y + src2.y
+
+dst.z = src0.z \times src1.z + src2.z
+
+dst.w = src0.w \times src1.w + src2.w

    +

    SUB - Subtract

    +
    +

    dst.x = src0.x - src1.x
+
+dst.y = src0.y - src1.y
+
+dst.z = src0.z - src1.z
+
+dst.w = src0.w - src1.w

    +

    LRP - Linear Interpolate

    +
    +

    dst.x = src0.x \times (src1.x - src2.x) + src2.x
+
+dst.y = src0.y \times (src1.y - src2.y) + src2.y
+
+dst.z = src0.z \times (src1.z - src2.z) + src2.z
+
+dst.w = src0.w \times (src1.w - src2.w) + src2.w

    +

    CND - Condition

    +
    +

    dst.x = (src2.x > 0.5) ? src0.x : src1.x
+
+dst.y = (src2.y > 0.5) ? src0.y : src1.y
+
+dst.z = (src2.z > 0.5) ? src0.z : src1.z
+
+dst.w = (src2.w > 0.5) ? src0.w : src1.w

    +

    DP2A - 2-component Dot Product And Add

    +
    +

    dst.x = src0.x \times src1.x + src0.y \times src1.y + src2.x
+
+dst.y = src0.x \times src1.x + src0.y \times src1.y + src2.x
+
+dst.z = src0.x \times src1.x + src0.y \times src1.y + src2.x
+
+dst.w = src0.x \times src1.x + src0.y \times src1.y + src2.x

    +

    FRAC - Fraction

    +
    +

    dst.x = src.x - \lfloor src.x\rfloor
+
+dst.y = src.y - \lfloor src.y\rfloor
+
+dst.z = src.z - \lfloor src.z\rfloor
+
+dst.w = src.w - \lfloor src.w\rfloor

    +

    CLAMP - Clamp

    +
    +

    dst.x = clamp(src0.x, src1.x, src2.x)
+
+dst.y = clamp(src0.y, src1.y, src2.y)
+
+dst.z = clamp(src0.z, src1.z, src2.z)
+
+dst.w = clamp(src0.w, src1.w, src2.w)

    +

    FLR - Floor

    +

    This is identical to ARL.

    +
    +

    dst.x = \lfloor src.x\rfloor
+
+dst.y = \lfloor src.y\rfloor
+
+dst.z = \lfloor src.z\rfloor
+
+dst.w = \lfloor src.w\rfloor

    +

    ROUND - Round

    +
    +

    dst.x = round(src.x)
+
+dst.y = round(src.y)
+
+dst.z = round(src.z)
+
+dst.w = round(src.w)

    +

    EX2 - Exponential Base 2

    +
    +

    dst.x = 2^{src.x}
+
+dst.y = 2^{src.x}
+
+dst.z = 2^{src.x}
+
+dst.w = 2^{src.x}

    +

    LG2 - Logarithm Base 2

    +
    +

    dst.x = \log_2{src.x}
+
+dst.y = \log_2{src.x}
+
+dst.z = \log_2{src.x}
+
+dst.w = \log_2{src.x}

    +

    POW - Power

    +
    +

    dst.x = src0.x^{src1.x}
+
+dst.y = src0.x^{src1.x}
+
+dst.z = src0.x^{src1.x}
+
+dst.w = src0.x^{src1.x}

    +

    XPD - Cross Product

    +
    +

    dst.x = src0.y \times src1.z - src1.y \times src0.z
+
+dst.y = src0.z \times src1.x - src1.z \times src0.x
+
+dst.z = src0.x \times src1.y - src1.x \times src0.y
+
+dst.w = 1

    +

    ABS - Absolute

    +
    +

    dst.x = |src.x|
+
+dst.y = |src.y|
+
+dst.z = |src.z|
+
+dst.w = |src.w|

    +

    RCC - Reciprocal Clamped

    +

    XXX cleanup on aisle three

    +
    +

    dst.x = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020)
+
+dst.y = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020)
+
+dst.z = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020)
+
+dst.w = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020)

    +

    DPH - Homogeneous Dot Product

    +
    +

    dst.x = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w
+
+dst.y = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w
+
+dst.z = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w
+
+dst.w = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w

    +

    COS - Cosine

    +
    +

    dst.x = \cos{src.x}
+
+dst.y = \cos{src.x}
+
+dst.z = \cos{src.x}
+
+dst.w = \cos{src.w}

    +

    DDX - Derivative Relative To X

    +
    +

    dst.x = partialx(src.x)
+
+dst.y = partialx(src.y)
+
+dst.z = partialx(src.z)
+
+dst.w = partialx(src.w)

    +

    DDY - Derivative Relative To Y

    +
    +

    dst.x = partialy(src.x)
+
+dst.y = partialy(src.y)
+
+dst.z = partialy(src.z)
+
+dst.w = partialy(src.w)

    +

    KILP - Predicated Discard

    +
    +discard
    +

    PK2H - Pack Two 16-bit Floats

    +
    +TBD
    +

    PK2US - Pack Two Unsigned 16-bit Scalars

    +
    +TBD
    +

    PK4B - Pack Four Signed 8-bit Scalars

    +
    +TBD
    +

    PK4UB - Pack Four Unsigned 8-bit Scalars

    +
    +TBD
    +

    RFL - Reflection Vector

    +
    +

    dst.x = 2 \times (src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z) / (src0.x \times src0.x + src0.y \times src0.y + src0.z \times src0.z) \times src0.x - src1.x
+
+dst.y = 2 \times (src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z) / (src0.x \times src0.x + src0.y \times src0.y + src0.z \times src0.z) \times src0.y - src1.y
+
+dst.z = 2 \times (src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z) / (src0.x \times src0.x + src0.y \times src0.y + src0.z \times src0.z) \times src0.z - src1.z
+
+dst.w = 1

    +

    Considered for removal.

    +

    SEQ - Set On Equal

    +
    +

    dst.x = (src0.x == src1.x) ? 1 : 0
+dst.y = (src0.y == src1.y) ? 1 : 0
+dst.z = (src0.z == src1.z) ? 1 : 0
+dst.w = (src0.w == src1.w) ? 1 : 0

    +

    SFL - Set On False

    +
    +

    dst.x = 0
+dst.y = 0
+dst.z = 0
+dst.w = 0

    +

    Considered for removal.

    +

    SGT - Set On Greater Than

    +
    +

    dst.x = (src0.x > src1.x) ? 1 : 0
+dst.y = (src0.y > src1.y) ? 1 : 0
+dst.z = (src0.z > src1.z) ? 1 : 0
+dst.w = (src0.w > src1.w) ? 1 : 0

    +

    SIN - Sine

    +
    +

    dst.x = \sin{src.x}
+
+dst.y = \sin{src.x}
+
+dst.z = \sin{src.x}
+
+dst.w = \sin{src.w}

    +

    SLE - Set On Less Equal Than

    +
    +

    dst.x = (src0.x <= src1.x) ? 1 : 0
+dst.y = (src0.y <= src1.y) ? 1 : 0
+dst.z = (src0.z <= src1.z) ? 1 : 0
+dst.w = (src0.w <= src1.w) ? 1 : 0

    +

    SNE - Set On Not Equal

    +
    +

    dst.x = (src0.x != src1.x) ? 1 : 0
+dst.y = (src0.y != src1.y) ? 1 : 0
+dst.z = (src0.z != src1.z) ? 1 : 0
+dst.w = (src0.w != src1.w) ? 1 : 0

    +

    STR - Set On True

    +
    +

    dst.x = 1
+dst.y = 1
+dst.z = 1
+dst.w = 1

    +

    TEX - Texture Lookup

    +
    +TBD
    +

    TXD - Texture Lookup with Derivatives

    +
    +TBD
    +

    TXP - Projective Texture Lookup

    +
    +TBD
    +

    UP2H - Unpack Two 16-Bit Floats

    +
    +

    TBD

    +

    Considered for removal.

    +
    +

    UP2US - Unpack Two Unsigned 16-Bit Scalars

    +
    +

    TBD

    +

    Considered for removal.

    +
    +

    UP4B - Unpack Four Signed 8-Bit Values

    +
    +

    TBD

    +

    Considered for removal.

    +
    +

    UP4UB - Unpack Four Unsigned 8-Bit Scalars

    +
    +

    TBD

    +

    Considered for removal.

    +
    +

    X2D - 2D Coordinate Transformation

    +
    +

    dst.x = src0.x + src1.x \times src2.x + src1.y \times src2.y
+dst.y = src0.y + src1.x \times src2.z + src1.y \times src2.w
+dst.z = src0.x + src1.x \times src2.x + src1.y \times src2.y
+dst.w = src0.y + src1.x \times src2.z + src1.y \times src2.w

    +

    Considered for removal.

    +
    +
    +

    GL_NV_vertex_program2¶

    +

    ARA - Address Register Add

    +
    +

    TBD

    +

    Considered for removal.

    +
    +

    ARR - Address Register Load With Round

    +
    +

    dst.x = round(src.x)
+
+dst.y = round(src.y)
+
+dst.z = round(src.z)
+
+dst.w = round(src.w)

    +

    BRA - Branch

    +
    +

    pc = target

    +

    Considered for removal.

    +
    +

    CAL - Subroutine Call

    +
    +push(pc) +pc = target
    +

    RET - Subroutine Call Return

    +
    +

    pc = pop()

    +

    Potential restrictions: +times Only occurs at end of function.

    +
    +

    SSG - Set Sign

    +
    +

    dst.x = (src.x > 0) ? 1 : (src.x < 0) ? -1 : 0
+
+dst.y = (src.y > 0) ? 1 : (src.y < 0) ? -1 : 0
+
+dst.z = (src.z > 0) ? 1 : (src.z < 0) ? -1 : 0
+
+dst.w = (src.w > 0) ? 1 : (src.w < 0) ? -1 : 0

    +

    CMP - Compare

    +
    +

    dst.x = (src0.x < 0) ? src1.x : src2.x
+
+dst.y = (src0.y < 0) ? src1.y : src2.y
+
+dst.z = (src0.z < 0) ? src1.z : src2.z
+
+dst.w = (src0.w < 0) ? src1.w : src2.w

    +

    KIL - Conditional Discard

    +
    +

    if (src.x < 0 || src.y < 0 || src.z < 0 || src.w < 0)
+  discard
+endif

    +

    SCS - Sine Cosine

    +
    +

    dst.x = \cos{src.x}
+
+dst.y = \sin{src.x}
+
+dst.z = 0
+
+dst.y = 1

    +

    TXB - Texture Lookup With Bias

    +
    +TBD
    +

    NRM - 3-component Vector Normalise

    +
    +

    dst.x = src.x / (src.x \times src.x + src.y \times src.y + src.z \times src.z)
+
+dst.y = src.y / (src.x \times src.x + src.y \times src.y + src.z \times src.z)
+
+dst.z = src.z / (src.x \times src.x + src.y \times src.y + src.z \times src.z)
+
+dst.w = 1

    +

    DIV - Divide

    +
    +

    dst.x = \frac{src0.x}{src1.x}
+
+dst.y = \frac{src0.y}{src1.y}
+
+dst.z = \frac{src0.z}{src1.z}
+
+dst.w = \frac{src0.w}{src1.w}

    +

    DP2 - 2-component Dot Product

    +
    +

    dst.x = src0.x \times src1.x + src0.y \times src1.y
+
+dst.y = src0.x \times src1.x + src0.y \times src1.y
+
+dst.z = src0.x \times src1.x + src0.y \times src1.y
+
+dst.w = src0.x \times src1.x + src0.y \times src1.y

    +

    TXL - Texture Lookup With LOD

    +
    +TBD
    +

    BRK - Break

    +
    +TBD
    +

    IF - If

    +
    +TBD
    +

    BGNFOR - Begin a For-Loop

    +
    +

    dst.x = floor(src.x) +dst.y = floor(src.y) +dst.z = floor(src.z)

    +
    +
    if (dst.y <= 0)
    +
    pc = [matching ENDFOR] + 1
    +
    +

    endif

    +
    +
    Note: The destination must be a loop register.
    +
    The source must be a constant register.
    +
    +

    Considered for cleanup / removal.

    +
    +

    REP - Repeat

    +
    +TBD
    +

    ELSE - Else

    +
    +TBD
    +

    ENDIF - End If

    +
    +TBD
    +

    ENDFOR - End a For-Loop

    +
    +

    dst.x = dst.x + dst.z +dst.y = dst.y - 1.0

    +
    +
    if (dst.y > 0)
    +
    pc = [matching BGNFOR instruction] + 1
    +
    +

    endif

    +

    Note: The destination must be a loop register.

    +

    Considered for cleanup / removal.

    +
    +

    ENDREP - End Repeat

    +
    +TBD
    +

    PUSHA - Push Address Register On Stack

    +
    +

    push(src.x) +push(src.y) +push(src.z) +push(src.w)

    +

    Considered for cleanup / removal.

    +
    +

    POPA - Pop Address Register From Stack

    +
    +

    dst.w = pop() +dst.z = pop() +dst.y = pop() +dst.x = pop()

    +

    Considered for cleanup / removal.

    +
    +
    +
    +

    GL_NV_gpu_program4¶

    +

    Support for these opcodes indicated by a special pipe capability bit (TBD).

    +

    CEIL - Ceiling

    +
    +

    dst.x = \lceil src.x\rceil
+
+dst.y = \lceil src.y\rceil
+
+dst.z = \lceil src.z\rceil
+
+dst.w = \lceil src.w\rceil

    +

    I2F - Integer To Float

    +
    +

    dst.x = (float) src.x
+
+dst.y = (float) src.y
+
+dst.z = (float) src.z
+
+dst.w = (float) src.w

    +

    NOT - Bitwise Not

    +
    +

    dst.x = ~src.x
+
+dst.y = ~src.y
+
+dst.z = ~src.z
+
+dst.w = ~src.w

    +

    TRUNC - Truncate

    +

    XXX how is this different from floor?

    +
    +

    dst.x = trunc(src.x)
+
+dst.y = trunc(src.y)
+
+dst.z = trunc(src.z)
+
+dst.w = trunc(src.w)

    +

    SHL - Shift Left

    +
    +

    dst.x = src0.x << src1.x
+
+dst.y = src0.y << src1.x
+
+dst.z = src0.z << src1.x
+
+dst.w = src0.w << src1.x

    +

    SHR - Shift Right

    +
    +

    dst.x = src0.x >> src1.x
+
+dst.y = src0.y >> src1.x
+
+dst.z = src0.z >> src1.x
+
+dst.w = src0.w >> src1.x

    +

    AND - Bitwise And

    +
    +

    dst.x = src0.x & src1.x
+
+dst.y = src0.y & src1.y
+
+dst.z = src0.z & src1.z
+
+dst.w = src0.w & src1.w

    +

    OR - Bitwise Or

    +
    +

    dst.x = src0.x | src1.x
+
+dst.y = src0.y | src1.y
+
+dst.z = src0.z | src1.z
+
+dst.w = src0.w | src1.w

    +

    MOD - Modulus

    +
    +

    dst.x = src0.x \bmod src1.x
+
+dst.y = src0.y \bmod src1.y
+
+dst.z = src0.z \bmod src1.z
+
+dst.w = src0.w \bmod src1.w

    +

    XOR - Bitwise Xor

    +
    +

    dst.x = src0.x ^ src1.x
+
+dst.y = src0.y ^ src1.y
+
+dst.z = src0.z ^ src1.z
+
+dst.w = src0.w ^ src1.w

    +

    SAD - Sum Of Absolute Differences

    +
    +

    dst.x = |src0.x - src1.x| + src2.x
+
+dst.y = |src0.y - src1.y| + src2.y
+
+dst.z = |src0.z - src1.z| + src2.z
+
+dst.w = |src0.w - src1.w| + src2.w

    +

    TXF - Texel Fetch

    +
    +TBD
    +

    TXQ - Texture Size Query

    +
    +TBD
    +

    CONT - Continue

    +
    +TBD
    +
    +
    +

    GL_NV_geometry_program4¶

    +

    EMIT - Emit

    +
    +TBD
    +

    ENDPRIM - End Primitive

    +
    +TBD
    +
    +
    +

    GLSL¶

    +

    BGNLOOP - Begin a Loop

    +
    +TBD
    +

    BGNSUB - Begin Subroutine

    +
    +TBD
    +

    ENDLOOP - End a Loop

    +
    +TBD
    +

    ENDSUB - End Subroutine

    +
    +TBD
    +

    NOP - No Operation

    +
    +Do nothing.
    +

    NRM4 - 4-component Vector Normalise

    +
    +

    dst.x = \frac{src.x}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w}
+
+dst.y = \frac{src.y}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w}
+
+dst.z = \frac{src.z}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w}
+
+dst.w = \frac{src.w}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w}

    +
    +
    +

    ps_2_x¶

    +

    CALLNZ - Subroutine Call If Not Zero

    +
    +TBD
    +

    IFC - If

    +
    +TBD
    +

    BREAKC - Break Conditional

    +
    +TBD
    +
    + +
    +

    Explanation of symbols used¶

    +
    +

    Functions¶

    +
    +

    |x| Absolute value of x.

    +

    \lceil x \rceil Ceiling of x.

    +
    +
    clamp(x,y,z) Clamp x between y and z.
    +
    (x < y) ? y : (x > z) ? z : x
    +
    +

    \lfloor x\rfloor Floor of x.

    +

    \log_2{x} Logarithm of x, base 2.

    +
    +
    max(x,y) Maximum of x and y.
    +
    (x > y) ? x : y
    +
    min(x,y) Minimum of x and y.
    +
    (x < y) ? x : y
    +
    +

    partialx(x) Derivative of x relative to fragment’s X.

    +

    partialy(x) Derivative of x relative to fragment’s Y.

    +

    pop() Pop from stack.

    +

    x^y x to the power y.

    +

    push(x) Push x on stack.

    +

    round(x) Round x.

    +

    trunc(x) Truncate x.

    +
    +
    +
    +

    Keywords¶

    +
    +

    discard Discard fragment.

    +

    dst First destination register.

    +

    dst0 First destination register.

    +

    pc Program counter.

    +

    src First source register.

    +

    src0 First source register.

    +

    src1 Second source register.

    +

    src2 Third source register.

    +

    target Label of target instruction.

    +
    +
    +
    +
    +

    Other tokens¶

    +
    +

    Declaration Semantic¶

    +
    +

    Follows Declaration token if Semantic bit is set.

    +

    Since its purpose is to link a shader with other stages of the pipeline, +it is valid to follow only those Declaration tokens that declare a register +either in INPUT or OUTPUT file.

    +

    SemanticName field contains the semantic name of the register being declared. +There is no default value.

    +

    SemanticIndex is an optional subscript that can be used to distinguish +different register declarations with the same semantic name. The default value +is 0.

    +

    The meanings of the individual semantic names are explained in the following +sections.

    +
    +
    +

    FACE¶

    +
    +

    Valid only in a fragment shader INPUT declaration.

    +

    FACE.x is negative when the primitive is back facing. FACE.x is positive +when the primitive is front facing.

    +
    +
    +
    @@ -59,6 +876,31 @@ used by all drivers.