summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvc0/nvc0_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_context.h')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_context.h b/src/gallium/drivers/nvc0/nvc0_context.h
index 7072b5918fa..140ce1ac7ef 100644
--- a/src/gallium/drivers/nvc0/nvc0_context.h
+++ b/src/gallium/drivers/nvc0/nvc0_context.h
@@ -27,7 +27,9 @@
27#include "nvc0_3d.xml.h" 27#include "nvc0_3d.xml.h"
28#include "nvc0_2d.xml.h" 28#include "nvc0_2d.xml.h"
29#include "nvc0_m2mf.xml.h" 29#include "nvc0_m2mf.xml.h"
30#include "nve4_p2mf.xml.h"
30 31
32/* NOTE: must keep NVC0_NEW_...PROG in consecutive bits in this order */
31#define NVC0_NEW_BLEND (1 << 0) 33#define NVC0_NEW_BLEND (1 << 0)
32#define NVC0_NEW_RASTERIZER (1 << 1) 34#define NVC0_NEW_RASTERIZER (1 << 1)
33#define NVC0_NEW_ZSA (1 << 2) 35#define NVC0_NEW_ZSA (1 << 2)
@@ -75,6 +77,11 @@ struct nvc0_context {
75 77
76 struct nvc0_screen *screen; 78 struct nvc0_screen *screen;
77 79
80 void (*m2mf_copy_rect)(struct nvc0_context *,
81 const struct nv50_m2mf_rect *dst,
82 const struct nv50_m2mf_rect *src,
83 uint32_t nblocksx, uint32_t nblocksy);
84
78 uint32_t dirty; 85 uint32_t dirty;
79 86
80 struct { 87 struct {
@@ -130,6 +137,8 @@ struct nvc0_context {
130 unsigned num_samplers[5]; 137 unsigned num_samplers[5];
131 uint16_t samplers_dirty[5]; 138 uint16_t samplers_dirty[5];
132 139
140 uint32_t tex_handles[5][PIPE_MAX_SAMPLERS]; /* for nve4 */
141
133 struct pipe_framebuffer_state framebuffer; 142 struct pipe_framebuffer_state framebuffer;
134 struct pipe_blend_color blend_colour; 143 struct pipe_blend_color blend_colour;
135 struct pipe_stencil_ref stencil_ref; 144 struct pipe_stencil_ref stencil_ref;
@@ -165,7 +174,7 @@ void nvc0_default_kick_notify(struct nouveau_pushbuf *);
165extern struct draw_stage *nvc0_draw_render_stage(struct nvc0_context *); 174extern struct draw_stage *nvc0_draw_render_stage(struct nvc0_context *);
166 175
167/* nvc0_program.c */ 176/* nvc0_program.c */
168boolean nvc0_program_translate(struct nvc0_program *); 177boolean nvc0_program_translate(struct nvc0_program *, uint16_t chipset);
169boolean nvc0_program_upload_code(struct nvc0_context *, struct nvc0_program *); 178boolean nvc0_program_upload_code(struct nvc0_context *, struct nvc0_program *);
170void nvc0_program_destroy(struct nvc0_context *, struct nvc0_program *); 179void nvc0_program_destroy(struct nvc0_context *, struct nvc0_program *);
171void nvc0_program_library_upload(struct nvc0_context *); 180void nvc0_program_library_upload(struct nvc0_context *);
@@ -206,6 +215,7 @@ extern void nvc0_init_surface_functions(struct nvc0_context *);
206/* nvc0_tex.c */ 215/* nvc0_tex.c */
207void nvc0_validate_textures(struct nvc0_context *); 216void nvc0_validate_textures(struct nvc0_context *);
208void nvc0_validate_samplers(struct nvc0_context *); 217void nvc0_validate_samplers(struct nvc0_context *);
218void nve4_set_tex_handles(struct nvc0_context *);
209 219
210struct pipe_sampler_view * 220struct pipe_sampler_view *
211nvc0_create_sampler_view(struct pipe_context *, 221nvc0_create_sampler_view(struct pipe_context *,
@@ -214,19 +224,16 @@ nvc0_create_sampler_view(struct pipe_context *,
214 224
215/* nvc0_transfer.c */ 225/* nvc0_transfer.c */
216void 226void
217nvc0_m2mf_transfer_rect(struct nvc0_context *, 227nvc0_init_transfer_functions(struct nvc0_context *);
218 const struct nv50_m2mf_rect *dst, 228
219 const struct nv50_m2mf_rect *src,
220 uint32_t nblocksx, uint32_t nblocksy);
221void 229void
222nvc0_m2mf_push_linear(struct nouveau_context *nv, 230nvc0_m2mf_push_linear(struct nouveau_context *nv,
223 struct nouveau_bo *dst, unsigned offset, unsigned domain, 231 struct nouveau_bo *dst, unsigned offset, unsigned domain,
224 unsigned size, const void *data); 232 unsigned size, const void *data);
225void 233void
226nvc0_m2mf_copy_linear(struct nouveau_context *nv, 234nve4_p2mf_push_linear(struct nouveau_context *nv,
227 struct nouveau_bo *dst, unsigned dstoff, unsigned dstdom, 235 struct nouveau_bo *dst, unsigned offset, unsigned domain,
228 struct nouveau_bo *src, unsigned srcoff, unsigned srcdom, 236 unsigned size, const void *data);
229 unsigned size);
230void 237void
231nvc0_cb_push(struct nouveau_context *, 238nvc0_cb_push(struct nouveau_context *,
232 struct nouveau_bo *bo, unsigned domain, 239 struct nouveau_bo *bo, unsigned domain,