Merge remote branch 'origin/7.8'
[mesa.git] / src / gallium / drivers / nv50 / nv50_context.h
index f65b328a56f6a47d409bb111b2d04f414b2f7e71..bc7831d9aca4c7fa599d82c5ac3556a1afaf5dda 100644 (file)
@@ -72,12 +72,23 @@ struct nv50_sampler_stateobj {
        unsigned tsc[8];
 };
 
+struct nv50_sampler_view {
+       struct pipe_sampler_view pipe;
+       uint32_t tic[8];
+};
+
 struct nv50_vtxelt_stateobj {
        struct pipe_vertex_element pipe[16];
        unsigned num_elements;
        uint32_t hw[16];
 };
 
+static INLINE struct nv50_sampler_view *
+nv50_sampler_view(struct pipe_sampler_view *view)
+{
+       return (struct nv50_sampler_view *)view;
+}
+
 static INLINE unsigned
 get_tile_height(uint32_t tile_mode)
 {
@@ -126,10 +137,9 @@ struct nv50_state {
        struct nouveau_stateobj *hw[64];
        uint64_t hw_dirty;
 
-       unsigned miptree_nr[PIPE_SHADER_TYPES];
+       unsigned sampler_view_nr[3];
        struct nouveau_stateobj *vtxbuf;
        struct nouveau_stateobj *vtxattr;
-       struct nouveau_stateobj *instbuf;
        unsigned vtxelt_nr;
 };
 
@@ -159,10 +169,10 @@ struct nv50_context {
        struct pipe_vertex_buffer vtxbuf[PIPE_MAX_ATTRIBS];
        unsigned vtxbuf_nr;
        struct nv50_vtxelt_stateobj *vtxelt;
-       struct nv50_sampler_stateobj *sampler[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
-       unsigned sampler_nr[PIPE_SHADER_TYPES];
-       struct nv50_miptree *miptree[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
-       unsigned miptree_nr[PIPE_SHADER_TYPES];
+       struct nv50_sampler_stateobj *sampler[3][PIPE_MAX_SAMPLERS];
+       unsigned sampler_nr[3];
+       struct pipe_sampler_view *sampler_views[3][PIPE_MAX_SAMPLERS];
+       unsigned sampler_view_nr[3];
 
        unsigned vbo_fifo;
 };
@@ -176,6 +186,7 @@ nv50_context(struct pipe_context *pipe)
 extern void nv50_init_surface_functions(struct nv50_context *nv50);
 extern void nv50_init_state_functions(struct nv50_context *nv50);
 extern void nv50_init_query_functions(struct nv50_context *nv50);
+extern void nv50_init_transfer_functions(struct nv50_context *nv50);
 
 extern void nv50_screen_init_miptree_functions(struct pipe_screen *pscreen);
 
@@ -236,7 +247,6 @@ extern void nv50_program_destroy(struct nv50_context *nv50,
 
 /* nv50_state_validate.c */
 extern boolean nv50_state_validate(struct nv50_context *nv50, unsigned dwords);
-extern void nv50_state_flush_notify(struct nouveau_channel *chan);
 
 extern void nv50_so_init_sifc(struct nv50_context *nv50,
                              struct nouveau_stateobj *so,
@@ -244,6 +254,7 @@ extern void nv50_so_init_sifc(struct nv50_context *nv50,
                              unsigned offset, unsigned size);
 
 /* nv50_tex.c */
+extern boolean nv50_tex_construct(struct nv50_sampler_view *view);
 extern void nv50_tex_relocs(struct nv50_context *);
 extern struct nouveau_stateobj *nv50_tex_validate(struct nv50_context *);