X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdocs%2Fd3d11ddi.txt;h=7cbcdc7e731560c783a1cbd00d4425b11b3cb8ef;hb=a730838a42c62b7729691b518a134017ff2d3b42;hp=0954c2926df528bcc756c424723e2301ffe122bd;hpb=2c22b8e61dc4adab658c6198feea30c006aa6c58;p=mesa.git diff --git a/src/gallium/docs/d3d11ddi.txt b/src/gallium/docs/d3d11ddi.txt index 0954c2926df..7cbcdc7e731 100644 --- a/src/gallium/docs/d3d11ddi.txt +++ b/src/gallium/docs/d3d11ddi.txt @@ -36,7 +36,7 @@ d3dumddi.h contains the DirectX 9 DDI interface BC1: DXT1 BC2: DXT3 BC3: DXT5 -BC5: RGTC +BC5: RGTC1 BC6H: BPTC float BC7: BPTC CS = compute shader: OpenCL-like shader @@ -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 @@ -125,8 +122,8 @@ CommandListExecute (D3D11 only) CopyStructureCount (D3D11 only) - Gallium does not support unordered access views (views that can be written to arbitrarily from compute shaders) -ClearDepthStencilView -> clear -ClearRenderTargetView -> clear +ClearDepthStencilView -> clear_depth_stencil +ClearRenderTargetView -> clear_render_target # D3D11 is not totally clear about whether this applies to any view or only a "currently-bound view" + Gallium allows to clear both depth/stencil and render target(s) in a single operation + Gallium supports double-precision depth values (but not rgba values!) @@ -165,10 +162,9 @@ 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 - ! Gallium merges depthstencil and rendertarget views into pipe_surface, which also doubles as a 2D surface abstraction - - lack of texture array support +CreateDepthStencilView -> create_surface +CreateRenderTargetView -> create_surface + ! Gallium merges depthstencil and rendertarget views into pipe_surface - lack of render-to-buffer support + Gallium supports using 3D texture zslices as a depth/stencil buffer (in theory) @@ -187,15 +183,10 @@ CreateVertexShader -> create_vs_state CheckCounter CheckCounterInfo CreateQuery -> create_query - - Gallium only supports occlusion, primitives generated and primitives emitted queries ! D3D11 implements fences with "event" queries - * TIMESTAMP could be implemented as an additional fields for other queries: some cards have hardware support for exactly this - * OCCLUSIONPREDICATE is required for the OpenGL v2 occlusion query functionality * others are performance counters, we may want them but they are not critical CreateRasterizerState - - Gallium lacks clamping of polygon offset depth biases - - Gallium lacks support to disable depth clipping + Gallium, like OpenGL, supports PIPE_POLYGON_MODE_POINT + Gallium, like OpenGL, supports per-face polygon fill modes + Gallium, like OpenGL, supports culling everything @@ -224,9 +215,7 @@ CreateResource -> texture_create or buffer_create ! 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 CreateSampler @@ -236,8 +225,6 @@ CreateSampler + Gallium supports setting min/max/mip filters and anisotropy independently CreateShaderResourceView (extended in D3D10.1) -> create_sampler_view - - Gallium lacks sampler views over buffers - - Gallium lacks texture arrays, and cube map views over texture arrays + Gallium supports specifying a swizzle ! D3D11 implements "cube views" as views into a 2D array texture @@ -271,31 +258,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 -> 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) @@ -306,7 +289,7 @@ DsSetShaderWithIfaces (D3D11 only) - Gallium does not support domain shaders Flush -> flush - ! Gallium supports fencing and several kinds of flushing here, D3D11 just has a dumb glFlush-like function + ! Gallium supports fencing, D3D11 just has a dumb glFlush-like function GenMips - Gallium lacks a mipmap generation interface, and does this manually with the 3D engine @@ -332,10 +315,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 @@ -346,7 +328,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 @@ -395,14 +376,13 @@ ResourceCopyRegion ResourceConvert (D3D10.1+ only) ResourceConvertRegion (D3D10.1+ only) -> resource_copy_region - - Gallium does not support hardware buffer copies - - Gallium does not support copying 3D texture subregions in a single call -ResourceIsStagingBusy -> is_texture_referenced, is_buffer_referenced - - Gallium does not support checking reference for a whole texture, but only a specific surface +ResourceIsStagingBusy -> + - Gallium lacks this + + Gallium can use fences ResourceReadAfterWriteHazard - ! Gallium specifies hides this, except for the render and texture caches + - Gallium lacks this ResourceResolveSubresource -> resource_resolve @@ -417,7 +397,6 @@ DynamicResourceMapDiscard DynamicResourceUnmap StagingResourceMap StagingResourceUnmap - -> buffer_map / buffer_unmap -> transfer functions ! Gallium and D3D have different semantics for transfers * D3D separates vertex/index buffers from constant buffers @@ -447,8 +426,7 @@ SetRenderTargets (extended in D3D11) -> set_framebuffer_state - Gallium does not support unordered access views - Gallium does not support geometry shader selection of texture array image / 3D texture zslice -SetResourceMinLOD (D3D11 only) - - Gallium does not support min lod directly on textures +SetResourceMinLOD (D3D11 only) -> pipe_sampler_view::tex::first_level SetScissorRects - Gallium lacks support for multiple geometry-shader-selectable scissor rectangles D3D11 has @@ -463,8 +441,9 @@ 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 + + Gallium has texture_barrier SoSetTargets -> set_stream_output_buffers