1 /**************************************************************************
3 * Copyright 2010 Luca Barbieri
5 * Permission is hereby granted, free of charge, to any person obtaining
6 * a copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sublicense, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
13 * The above copyright notice and this permission notice (including the
14 * next paragraph) shall be included in all copies or substantial
15 * portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
21 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 **************************************************************************/
27 #ifndef D3D1X_PRIVATE_H_
28 #define D3D1X_PRIVATE_H_
37 #include "sm4_to_tgsi.h"
39 #include "d3d1xstutil.h"
42 #include <d3d11shader.h>
46 #include <pipe/p_defines.h>
47 #include <pipe/p_screen.h>
48 #include <pipe/p_context.h>
49 #include <util/u_inlines.h>
50 #include <util/u_format.h>
51 #include <util/u_caps.h>
52 #include <util/u_debug.h>
53 #include <os/os_thread.h>
56 #include "galliumdxgi.h"
57 #include "galliumd3d10_1.h"
58 #include "galliumd3d11.h"
61 #define invalid(x) unlikely(x)
63 #define invalid(x) (0)
66 #define D3D10_STAGE_VS 0
67 #define D3D10_STAGE_PS 1
68 #define D3D10_STAGE_GS 2
69 #define D3D10_STAGES 3
71 #define D3D11_STAGE_VS 0
72 #define D3D11_STAGE_PS 1
73 #define D3D11_STAGE_GS 2
74 #define D3D11_STAGE_HS 3
75 #define D3D11_STAGE_DS 4
76 #define D3D11_STAGE_CS 5
77 #define D3D11_STAGES 6
79 #define D3D11_BLEND_COUNT 20
80 extern unsigned d3d11_to_pipe_blend
[D3D11_BLEND_COUNT
];
82 #define D3D11_USAGE_COUNT 4
83 extern unsigned d3d11_to_pipe_usage
[D3D11_USAGE_COUNT
];
85 #define D3D11_STENCIL_OP_COUNT 9
86 extern unsigned d3d11_to_pipe_stencil_op
[D3D11_STENCIL_OP_COUNT
];
88 #define D3D11_TEXTURE_ADDRESS_COUNT 6
89 extern unsigned d3d11_to_pipe_wrap
[D3D11_TEXTURE_ADDRESS_COUNT
];
91 #define D3D11_QUERY_COUNT 16
92 extern unsigned d3d11_to_pipe_query
[D3D11_QUERY_COUNT
];
93 extern unsigned d3d11_query_size
[D3D11_QUERY_COUNT
];