p_config.h: Rely on glibc endianness definitions when available
[mesa.git] / src / gallium / docs / d3d11ddi.txt
index d9c2b441a943f01e1e8546169098d6591f426f7b..b5a06b4b9434e122e162b444a1445ddb5a4d0f1c 100644 (file)
@@ -66,9 +66,6 @@ Unordered access view: view supporting random read/write access (usually from co
 clear
        + Gallium supports clearing both render targets and depth/stencil with a single call
 
-draw_range_elements
-       + Gallium supports indexed draw with explicit range
-
 fence_signalled
 fence_finish
        + D3D10/D3D11 don't appear to support explicit fencing; queries can often substitute though, and flushing is supported
@@ -79,7 +76,7 @@ set_clip_state
 set_polygon_stipple
        + Gallium supports polygon stipple
 
-resource_fill_region
+clearRT/clearDS
        + Gallium supports subrectangle fills of surfaces, D3D10 only supports full clears of views
 
 * DirectX 10/11 DDI functions and Gallium equivalents
@@ -165,8 +162,8 @@ CreateDepthStencilState -> create_depth_stencil_alpha_state
        + Gallium has per-face writemask/valuemasks, D3D11 uses the same value for back and front
        + Gallium supports the alpha test, which D3D11 lacks
 
-CreateDepthStencilView -> get_tex_surface
-CreateRenderTargetView -> get_tex_surface
+CreateDepthStencilView -> create_surface
+CreateRenderTargetView -> create_surface
        ! Gallium merges depthstencil and rendertarget views into pipe_surface, which also doubles as a 2D surface abstraction
        - lack of texture array support
        - lack of render-to-buffer support
@@ -177,7 +174,7 @@ CreateElementLayout -> create_vertex_elements_state
        ! D3D11 has an extra flag (InputSlotClass) that is the same as instance_divisor == 0
 
 CreateGeometryShader -> create_gs_state
-CreateGeometryShaderWithStreamOutput -> create_gs_state
+CreateGeometryShaderWithStreamOutput -> create_gs_state + create_stream_output_state
 CreatePixelShader -> create_fs_state
 CreateVertexShader -> create_vs_state
        > bytecode is different (see D3d10tokenizedprogramformat.hpp)
@@ -220,12 +217,10 @@ CreateResource -> texture_create or buffer_create
        # Note that hardware often has the implicit rule, so the D3D11 interface seems to make little sense
        # Also, the D3D11 API does not allow the user to specify mipmap sizes, so this really seems a dubious decision on Microsoft's part
        - D3D11 supports specifying initial data to write in the resource
-       - Gallium lacks support for stream output buffer usage
        - Gallium does not support unordered access buffers
        ! D3D11 specifies mapping flags (i.e. read/write/discard);:it's unclear what they are used for here
        - D3D11 supports odd things in the D3D10_DDI_RESOURCE_MISC_FLAG enum (D3D10_DDI_RESOURCE_MISC_DISCARD_ON_PRESENT, D3D11_DDI_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS, D3D11_DDI_RESOURCE_MISC_BUFFER_STRUCTURED)
        - Gallium does not support indirect draw call parameter buffers
-       - Gallium lacks array textures
        ! D3D11 supports specifying hardware modes and other stuff here for scanout resources
        + Gallium allows specifying minimum buffer alignment
        ! D3D11 implements cube maps as 2D array textures
@@ -272,32 +267,27 @@ Dispatch (D3D11 only)
 DispatchIndirect (D3D11 only)
        - Gallium does not support compute shaders
 
-Draw -> draw_arrays
+Draw -> draw_vbo
        ! D3D11 sets primitive modes separately with IaSetTopology: it's not obvious which is better
 
-DrawAuto
-       - Gallium lacks stream out and DrawAuto
+DrawAuto -> draw_auto
 
-DrawIndexed -> draw_elements
+DrawIndexed -> draw_vbo
        ! D3D11 sets primitive modes separately with IaSetTopology: it's not obvious which is better
-       * may want to add a separate set_index_buffer
-       - Gallium lacks base vertex for indexed draw calls
-       + D3D11 lacks draw_range_elements functionality, which is required for OpenGL
+       + D3D11 lacks explicit range, which is required for OpenGL
 
-DrawIndexedInstanced -> draw_elements_instanced
+DrawIndexedInstanced -> draw_vbo
        ! D3D11 sets primitive modes separately with IaSetTopology: it's not obvious which is better
-       * may want to add a separate set_index_buffer
-       - Gallium lacks base vertex for indexed draw calls
 
-DrawIndexedInstancedIndirect (D3D11 only) -> call draw_elements_instanced multiple times in software
-       # this allows to use an hardware buffer to specify the parameters for multiple draw_elements_instanced calls
+DrawIndexedInstancedIndirect (D3D11 only)
+       # this allows to use an hardware buffer to specify the parameters for multiple draw_vbo calls
        - Gallium does not support draw call parameter buffers and indirect draw
 
-DrawInstanced -> draw_arrays_instanced
+DrawInstanced -> draw_vbo
        ! D3D11 sets primitive modes separately with IaSetTopology: it's not obvious which is better
 
-DrawInstancedIndirect (D3D11 only) -> call draw_arrays_instanced multiple times in software
-       # this allows to use an hardware buffer to specify the parameters for multiple draw_arrays_instanced calls
+DrawInstancedIndirect (D3D11 only)
+       # this allows to use an hardware buffer to specify the parameters for multiple draw_vbo calls
        - Gallium does not support draw call parameter buffers and indirect draws
 
 DsSetConstantBuffers (D3D11 only)
@@ -334,10 +324,9 @@ HsSetShaderResources (D3D11 only)
 HsSetShaderWithIfaces (D3D11 only)
        - Gallium does not support hull shaders
 
-IaSetIndexBuffer
-       ! Gallium passes this to the draw_elements or draw_elements_instanced calls
+IaSetIndexBuffer -> set_index_buffer
        + Gallium supports 8-bit indices
-       ! the D3D11 interface allows index-size-unaligned byte offsets into index buffers; it's not clear whether they actually work
+       # the D3D11 interface allows index-size-unaligned byte offsets into the index buffer; most drivers will abort with an assertion
 
 IaSetInputLayout -> bind_vertex_elements_state
 
@@ -348,7 +337,6 @@ IaSetTopology
        + Gallium supports line loops, triangle fans, quads, quad strips and polygons
 
 IaSetVertexBuffers -> set_vertex_buffers
-       + Gallium allows to specify a max_index here
        - Gallium only allows setting all vertex buffers at once, while D3D11 supports setting a subset
 
 OpenResource -> texture_from_handle
@@ -465,11 +453,10 @@ SetVertexPipelineOutput (D3D10.1+ only)
 SetViewports
        - Gallium lacks support for multiple geometry-shader-selectable viewports D3D11 has
 
-ShaderResourceViewReadAfterWriteHazard -> flush(PIPE_FLUSH_RENDER_CACHE)
-       - Gallium does not support specifying this per-render-target/view
+ShaderResourceViewReadAfterWriteHazard
+       - Gallium lacks support for this
 
-SoSetTargets
-       - Gallium does not support stream out
+SoSetTargets -> set_stream_output_buffers
 
 VsSetConstantBuffers -> for(i = StartBuffer; i < NumBuffers; ++i) set_constant_buffer(PIPE_SHADER_VERTEX, i, phBuffers[i])
        * may want to split into fragment/vertex-specific versions