diff options
author | Ilia Mirkin <[email protected]> | 2014-05-09 23:13:38 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-05-11 19:26:31 -0400 |
commit | 863573b9cbeb26722fe7bdfbcc4ca6bffdc7dbf6 (patch) | |
tree | 5fdb7c83606d133e794f71bda254a460813f79b8 /src/gallium/drivers/nouveau/nv50 | |
parent | 68f47cad0d23281309741cc47eeaa26ebbb41bca (diff) |
nv50: fix setting of texture ms info to be per-stage
Different textures may be bound to each slot for each stage. So we need
to be able to upload ms parameters for each one without stages
overwriting each other.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Ben Skeggs <[email protected]>
Cc: "10.1 10.2" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_context.h | 10 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_tex.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.h b/src/gallium/drivers/nouveau/nv50/nv50_context.h index b776deed0ea..3b7cb1854d5 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_context.h +++ b/src/gallium/drivers/nouveau/nv50/nv50_context.h @@ -78,16 +78,16 @@ /* 8 user clip planes, at 4 32-bit floats each */ #define NV50_CB_AUX_UCP_OFFSET 0x0000 #define NV50_CB_AUX_UCP_SIZE (8 * 4 * 4) -/* 256 textures, each with ms_x, ms_y u32 pairs */ +/* 16 textures * 3 shaders, each with ms_x, ms_y u32 pairs */ #define NV50_CB_AUX_TEX_MS_OFFSET 0x0080 -#define NV50_CB_AUX_TEX_MS_SIZE (256 * 2 * 4) +#define NV50_CB_AUX_TEX_MS_SIZE (16 * 3 * 2 * 4) /* For each MS level (4), 8 sets of 32-bit integer pairs sample offsets */ -#define NV50_CB_AUX_MS_OFFSET 0x880 +#define NV50_CB_AUX_MS_OFFSET 0x200 #define NV50_CB_AUX_MS_SIZE (4 * 8 * 4 * 2) /* Sample position pairs for the current output MS level */ -#define NV50_CB_AUX_SAMPLE_OFFSET 0x980 +#define NV50_CB_AUX_SAMPLE_OFFSET 0x300 #define NV50_CB_AUX_SAMPLE_OFFSET_SIZE (4 * 8 * 2) -/* next spot: 0x9c0 */ +/* next spot: 0x340 */ /* 4 32-bit floats for the vertex runout, put at the end */ #define NV50_CB_AUX_RUNOUT_OFFSET (NV50_CB_AUX_SIZE - 0x10) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_tex.c b/src/gallium/drivers/nouveau/nv50/nv50_tex.c index 5cfce3a71ff..0d2604e3921 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_tex.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_tex.c @@ -286,7 +286,7 @@ nv50_validate_tic(struct nv50_context *nv50, int s) } if (nv50->num_textures[s]) { BEGIN_NV04(push, NV50_3D(CB_ADDR), 1); - PUSH_DATA (push, (NV50_CB_AUX_TEX_MS_OFFSET << (8 - 2)) | NV50_CB_AUX); + PUSH_DATA (push, ((NV50_CB_AUX_TEX_MS_OFFSET + 16 * s * 2 * 4) << (8 - 2)) | NV50_CB_AUX); BEGIN_NI04(push, NV50_3D(CB_DATA(0)), nv50->num_textures[s] * 2); for (i = 0; i < nv50->num_textures[s]; i++) { struct nv50_tic_entry *tic = nv50_tic_entry(nv50->textures[s][i]); |