diff options
author | Luca Barbieri <[email protected]> | 2010-09-23 18:03:34 +0200 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-09-24 09:15:49 +0200 |
commit | 4babdc78448f92b8d027a66cd506351a16aef4ec (patch) | |
tree | 946f9756e1e4b902e16716758361aaa8ef1d5172 /src/gallium/state_trackers/d3d1x/d3d1xstutil | |
parent | f71f8c7d18a1a92681c337cb6dbf507ab06b62b1 (diff) |
d3d1x: add untested support for geometry shader translation
Diffstat (limited to 'src/gallium/state_trackers/d3d1x/d3d1xstutil')
-rw-r--r-- | src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h | 6 | ||||
-rw-r--r-- | src/gallium/state_trackers/d3d1x/d3d1xstutil/src/d3d_sm4_enums.cpp | 42 |
2 files changed, 48 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h b/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h index 313aa10a377..2b613b82d11 100644 --- a/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h +++ b/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h @@ -62,6 +62,12 @@ extern "C" #undef max #endif +#define D3D_PRIMITIVE_TOPOLOGY_COUNT 65 +extern unsigned d3d_to_pipe_prim[D3D_PRIMITIVE_TOPOLOGY_COUNT]; + +#define D3D_PRIMITIVE_COUNT 40 +extern unsigned d3d_to_pipe_prim_type[D3D_PRIMITIVE_COUNT]; + /* NOTE: this _depends_ on the vtable layout of the C++ compiler to be * binary compatible with Windows. * Furthermore some absurd vtable layout likely won't work at all, since diff --git a/src/gallium/state_trackers/d3d1x/d3d1xstutil/src/d3d_sm4_enums.cpp b/src/gallium/state_trackers/d3d1x/d3d1xstutil/src/d3d_sm4_enums.cpp new file mode 100644 index 00000000000..410a56c2485 --- /dev/null +++ b/src/gallium/state_trackers/d3d1x/d3d1xstutil/src/d3d_sm4_enums.cpp @@ -0,0 +1,42 @@ +#include "d3d1xstutil.h" + +unsigned d3d_to_pipe_prim[D3D_PRIMITIVE_TOPOLOGY_COUNT] = +{ + 0, + PIPE_PRIM_POINTS, + PIPE_PRIM_LINES, + PIPE_PRIM_LINE_STRIP, + PIPE_PRIM_TRIANGLES, + PIPE_PRIM_TRIANGLE_STRIP, + PIPE_PRIM_LINES_ADJACENCY, + PIPE_PRIM_LINE_STRIP_ADJACENCY, + PIPE_PRIM_TRIANGLES_ADJACENCY, + PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY, + /* gap */ + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, + /* patches */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +unsigned d3d_to_pipe_prim_type[D3D_PRIMITIVE_COUNT] = +{ + 0, + PIPE_PRIM_POINTS, + PIPE_PRIM_LINES, + PIPE_PRIM_TRIANGLES, + 0, + PIPE_PRIM_POINTS, + PIPE_PRIM_LINES_ADJACENCY, + PIPE_PRIM_TRIANGLES_ADJACENCY, + /* patches */ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; |