Merge branch 'master' into gallium-sampler-view
[mesa.git] / src / gallium / drivers / nv50 / nv50_context.h
index 8793c2aac5d340b7915c2e9c7ce6271cc0ed6d41..8a5f7cb25192e0d4bf03396bb70a0bf1cfe5212c 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)
 {
@@ -160,6 +171,8 @@ struct nv50_context {
        struct nv50_vtxelt_stateobj *vtxelt;
        struct nv50_sampler_stateobj *sampler[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
        unsigned sampler_nr[PIPE_SHADER_TYPES];
+       struct pipe_sampler_view *sampler_views[3][PIPE_MAX_SAMPLERS];
+       unsigned sampler_view_nr[3];
        struct nv50_miptree *miptree[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
        unsigned miptree_nr[PIPE_SHADER_TYPES];
 
@@ -242,6 +255,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 *);