st/nine: Fix volumetexture dtor on ctor failure
[mesa.git] / src / gallium / state_trackers / nine / device9.h
index 73a43cf08ffe24535a12972b6197071836dcce28..4cce29a28e0d43de569a0971961506cb4a7966b3 100644 (file)
@@ -38,6 +38,7 @@ struct pipe_context;
 struct cso_context;
 struct hud_context;
 struct u_upload_mgr;
+struct csmt_context;
 
 struct NineSwapChain9;
 struct NineStateBlock9;
@@ -48,11 +49,22 @@ struct NineDevice9
 {
     struct NineUnknown base;
     boolean ex;
+    boolean may_swvp;
 
     /* G3D context */
     struct pipe_screen *screen;
-    struct pipe_context *pipe;
-    struct cso_context *cso;
+    /* For first time upload. No Sync with rendering thread */
+    struct pipe_context *pipe_secondary;
+    struct pipe_screen *screen_sw;
+    struct pipe_context *pipe_sw;
+    struct cso_context *cso_sw;
+
+    /* CSMT context */
+    struct csmt_context *csmt_ctx;
+    BOOL csmt_active;
+
+    /* For DISCARD/NOOVERWRITE */
+    struct nine_buffer_upload *buffer_upload;
 
     /* creation parameters */
     D3DCAPS9 caps;
@@ -67,6 +79,8 @@ struct NineDevice9
     struct NineStateBlock9 *record;
     struct nine_state *update; /* state to update (&state / &record->state) */
     struct nine_state state;   /* device state */
+    struct nine_context context;
+    struct nine_state_sw_internal state_sw_internal;
 
     struct list_head update_buffers;
     struct list_head update_textures;
@@ -76,10 +90,6 @@ struct NineDevice9
     boolean is_recording;
     boolean in_scene;
 
-    boolean prefer_user_constbuf;
-
-    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;
@@ -112,15 +122,16 @@ struct NineDevice9
         POINT pos;
         BOOL visible;
         boolean software;
+        void *hw_upload_temp;
     } cursor;
 
     struct {
         boolean user_vbufs;
-        boolean user_ibufs;
-        boolean user_cbufs;
+        boolean user_sw_vbufs;
         boolean window_space_position_support;
         boolean vs_integer;
         boolean ps_integer;
+        boolean offset_units_unscaled;
     } driver_caps;
 
     struct {
@@ -128,9 +139,6 @@ struct NineDevice9
     } 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;
 
@@ -143,6 +151,9 @@ struct NineDevice9
     int minor_version_num;
     long long available_texture_mem;
     long long available_texture_limit;
+
+    /* software vertex processing */
+    boolean swvp;
 };
 static inline struct NineDevice9 *
 NineDevice9( void *data )
@@ -190,9 +201,6 @@ NineDevice9_GetScreen( struct NineDevice9 *This );
 struct pipe_context *
 NineDevice9_GetPipe( struct NineDevice9 *This );
 
-struct cso_context *
-NineDevice9_GetCSO( struct NineDevice9 *This );
-
 const D3DCAPS9 *
 NineDevice9_GetCaps( struct NineDevice9 *This );