SVGA3dElementLayoutId id; /**< VGPU10 */
};
+struct svga_constant_buffer {
+ struct svga_winsys_surface *handle;
+ unsigned size;
+};
/* Use to calculate differences between state emitted to hardware and
* current driver-calculated state.
unsigned num_vertex_buffers;
enum pipe_prim_type reduced_prim;
+ unsigned vertex_id_bias;
+
struct {
unsigned flag_1d;
unsigned flag_srgb;
struct svga_shader_variant *cs;
/** Currently bound constant buffer, per shader stage */
- struct pipe_resource *constbuf[PIPE_SHADER_TYPES];
+ struct pipe_resource *constbuf[PIPE_SHADER_TYPES][SVGA_MAX_CONST_BUFS];
+ struct svga_constant_buffer constbufoffsets[PIPE_SHADER_TYPES][SVGA_MAX_CONST_BUFS];
/** Bitmask of enabled constant buffers */
unsigned enabled_constbufs[PIPE_SHADER_TYPES];
#define SVGA_NEW_TCS_CONST_BUFFER ((uint64_t) 0x1000000000)
#define SVGA_NEW_TES_CONST_BUFFER ((uint64_t) 0x2000000000)
#define SVGA_NEW_TCS_PARAM ((uint64_t) 0x4000000000)
+#define SVGA_NEW_FS_CONSTS ((uint64_t) 0x8000000000)
+#define SVGA_NEW_VS_CONSTS ((uint64_t) 0x10000000000)
+#define SVGA_NEW_GS_CONSTS ((uint64_t) 0x20000000000)
+#define SVGA_NEW_TCS_CONSTS ((uint64_t) 0x40000000000)
+#define SVGA_NEW_TES_CONSTS ((uint64_t) 0x800000000000)
#define SVGA_NEW_ALL ((uint64_t) 0xFFFFFFFFFFFFFFFF)
+#define SVGA_NEW_CONST_BUFFER \
+ (SVGA_NEW_FS_CONST_BUFFER | SVGA_NEW_VS_CONST_BUFFER | \
+ SVGA_NEW_GS_CONST_BUFFER | \
+ SVGA_NEW_TCS_CONST_BUFFER | SVGA_NEW_TES_CONST_BUFFER)
+
void svga_init_state_functions( struct svga_context *svga );
void svga_init_flush_functions( struct svga_context *svga );
void svga_hwtnl_flush_retry( struct svga_context *svga );
void svga_hwtnl_flush_buffer( struct svga_context *svga,
struct pipe_resource *buffer );
+boolean svga_hwtnl_has_pending_prim(struct svga_hwtnl *);
void svga_surfaces_flush(struct svga_context *svga);