From 5ba380c226b127cbfad00dd647471e1518ba2cb2 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Mon, 2 Jan 2017 00:48:51 -0500 Subject: nvc0: enable FBFETCH with a special slot for color buffer 0 We don't need to support all the color buffers for advanced blend, just cb0. For Fermi, we use the special binding slots so that we don't overlap with user textures, while Kepler+ gets a dedicated position for the fb handle in the driver constbuf. This logic is only triggered when a FBFETCH is actually present so it should be a no-op most of the time. Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nvc0/nvc0_context.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/drivers/nouveau/nvc0/nvc0_context.h') diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h index 37aecae9047..79a5333367e 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h @@ -120,6 +120,9 @@ /* block/grid size, at 3 32-bits integers each, gridid and work_dim */ #define NVC0_CB_AUX_GRID_INFO(i) 0x100 + (i) * 4 /* CP */ #define NVC0_CB_AUX_GRID_SIZE (8 * 4) +/* FB texture handle */ +#define NVC0_CB_AUX_FB_TEX_INFO 0x100 /* FP */ +#define NVC0_CB_AUX_FB_TEX_SIZE (4) /* 8 user clip planes, at 4 32-bits floats each */ #define NVC0_CB_AUX_UCP_INFO 0x120 #define NVC0_CB_AUX_UCP_SIZE (PIPE_MAX_CLIP_PLANES * 4 * 4) @@ -206,6 +209,7 @@ struct nvc0_context { unsigned num_samplers[6]; uint32_t samplers_dirty[6]; bool seamless_cube_map; + struct pipe_sampler_view *fbtexture; uint32_t tex_handles[6][PIPE_MAX_SAMPLERS]; /* for nve4 */ -- cgit v1.2.3