From 59a692916ca251db995050f7fc0bb7b4e6e4780b Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Mon, 13 Jun 2016 22:28:32 +0200 Subject: gallium: Add a cap for offset_units_unscaled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit D3D9 has a different behaviour for depth bias. For OGL/D3D1X, the depth bias unit is the minimal resolvable value for the depth buffer, which depends on the format (and has different behaviour for float depth buffers). For D3D9, the depth bias unit is 1.0f. Signed-off-by: Axel Davy Reviewed-by: Marek Olšák --- src/gallium/docs/source/cso/rasterizer.rst | 6 ++++++ src/gallium/docs/source/screen.rst | 2 ++ 2 files changed, 8 insertions(+) (limited to 'src/gallium/docs/source') diff --git a/src/gallium/docs/source/cso/rasterizer.rst b/src/gallium/docs/source/cso/rasterizer.rst index 8d473b8446e..616e4511a2d 100644 --- a/src/gallium/docs/source/cso/rasterizer.rst +++ b/src/gallium/docs/source/cso/rasterizer.rst @@ -127,6 +127,12 @@ offset_tri offset_units Specifies the polygon offset bias +offset_units_unscaled + Specifies the unit of the polygon offset bias. If false, use the + GL/D3D1X behaviour. If true, offset_units is a floating point offset + which isn't scaled (D3D9). Note that GL/D3D1X behaviour has different + formula whether the depth buffer is unorm or float, which is not + the case for D3D9. offset_scale Specifies the polygon offset scale offset_clamp diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index a20b372b1a9..141b45aa805 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -343,6 +343,8 @@ The integer capabilities: * ``PIPE_CAP_TGSI_VOTE``: Whether the ``VOTE_*`` ops can be used in shaders. * ``PIPE_CAP_MAX_WINDOW_RECTANGLES``: The maxium number of window rectangles supported in ``set_window_rectangles``. +* ``PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED``: If true, the driver implements support + for ``pipe_rasterizer_state::offset_units_unscaled``. .. _pipe_capf: -- cgit v1.2.3