struct NineSwapChain9;
struct NineStateBlock9;
-#include "util/u_double_list.h"
+#include "util/list.h"
struct NineDevice9
{
struct NineUnknown base;
boolean ex;
- D3DDISPLAYMODEEX *pFullscreenDisplayMode;
/* G3D context */
struct pipe_screen *screen;
struct nine_state state; /* device state */
struct list_head update_textures;
+ struct list_head managed_textures;
boolean is_recording;
boolean in_scene;
struct pipe_resource *constbuf_vs;
struct pipe_resource *constbuf_ps;
+ uint16_t vs_const_size;
+ uint16_t ps_const_size;
uint16_t max_vs_const_f;
uint16_t max_ps_const_f;
- uint32_t vs_bool_true;
- uint32_t ps_bool_true;
+
+ struct pipe_resource *dummy_texture;
+ struct pipe_sampler_view *dummy_sampler_view;
+ struct pipe_sampler_state dummy_sampler_state;
struct gen_mipmap_state *gen_mipmap;
struct {
boolean user_vbufs;
boolean user_ibufs;
+ boolean user_cbufs;
boolean window_space_position_support;
+ boolean vs_integer;
+ boolean ps_integer;
} driver_caps;
- struct u_upload_mgr *upload;
+ struct {
+ boolean buggy_barycentrics;
+ } driver_bugs;
+
+ struct u_upload_mgr *vertex_uploader;
+ struct u_upload_mgr *index_uploader;
+ struct u_upload_mgr *constbuf_uploader;
+ unsigned constbuf_alignment;
struct nine_range_pool range_pool;
struct hud_context *hud; /* NULL if hud is disabled */
+
+ /* dummy vbo (containing 0 0 0 0) to bind if vertex shader input
+ * is not bound to anything by the vertex declaration */
+ struct pipe_resource *dummy_vbo;
};
-static INLINE struct NineDevice9 *
+static inline struct NineDevice9 *
NineDevice9( void *data )
{
return (struct NineDevice9 *)data;
IDirect3D9 *pD3D9,
ID3DPresentGroup *pPresentationGroup,
struct d3dadapter9_context *pCTX,
+ boolean ex,
+ D3DDISPLAYMODEEX *pFullscreenDisplayMode,
struct NineDevice9 **ppOut );
HRESULT
D3DPRESENT_PARAMETERS *pPresentationParameters,
IDirect3D9 *pD3D9,
ID3DPresentGroup *pPresentationGroup,
- struct d3dadapter9_context *pCTX );
+ struct d3dadapter9_context *pCTX,
+ boolean ex,
+ D3DDISPLAYMODEEX *pFullscreenDisplayMode );
void
NineDevice9_dtor( struct NineDevice9 *This );
const D3DCAPS9 *
NineDevice9_GetCaps( struct NineDevice9 *This );
-/* Mask: 0x1 = constant buffers, 0x2 = stipple */
-void
-NineDevice9_RestoreNonCSOState( struct NineDevice9 *This, unsigned mask );
-
/*** Direct3D public ***/
HRESULT WINAPI