summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_context.h
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-02-25 16:39:58 +0100
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-02-25 16:39:58 +0100
commit44570063bf8a4f45807bc1598c8de291cdc64506 (patch)
tree2cbf4fb1f02d78c374c669c0e8231ab7ebff8ac1 /src/gallium/drivers/nv50/nv50_context.h
parent013dd29cca9b90555b7481a81ea1727fb7cea28b (diff)
nv50: update to handle new sampler view state
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_context.h')
-rw-r--r--src/gallium/drivers/nv50/nv50_context.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/gallium/drivers/nv50/nv50_context.h b/src/gallium/drivers/nv50/nv50_context.h
index 7b879851b0..42405c1a89 100644
--- a/src/gallium/drivers/nv50/nv50_context.h
+++ b/src/gallium/drivers/nv50/nv50_context.h
@@ -72,6 +72,17 @@ struct nv50_sampler_stateobj {
unsigned tsc[8];
};
+struct nv50_sampler_view {
+ struct pipe_sampler_view pipe;
+ uint32_t tic[8];
+};
+
+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)
{
@@ -130,7 +141,7 @@ struct nv50_state {
unsigned viewport_bypass;
struct nouveau_stateobj *tsc_upload;
struct nouveau_stateobj *tic_upload;
- unsigned miptree_nr[PIPE_SHADER_TYPES];
+ unsigned sampler_view_nr[3];
struct nouveau_stateobj *vertprog;
struct nouveau_stateobj *fragprog;
struct nouveau_stateobj *geomprog;
@@ -170,11 +181,10 @@ struct nv50_context {
unsigned vtxbuf_nr;
struct pipe_vertex_element vtxelt[PIPE_MAX_ATTRIBS];
unsigned vtxelt_nr;
- 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];
- struct pipe_sampler_view *sampler_views[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];
uint16_t vbo_fifo;
};
@@ -244,6 +254,7 @@ extern void nv50_so_init_sifc(struct nv50_context *nv50,
/* nv50_tex.c */
extern void nv50_tex_validate(struct nv50_context *);
+extern boolean nv50_tex_construct(struct nv50_sampler_view *view);
/* nv50_transfer.c */
extern void