summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nouveau_context.h
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-09-09 03:17:38 -0400
committerEmil Velikov <[email protected]>2015-09-11 19:19:31 +0100
commit4ae2ffbff142de4532b8e7222e4620c84dee3652 (patch)
treeb8859cd1c7bf1d6e32489169165d83bd5181d82b /src/gallium/drivers/nouveau/nouveau_context.h
parentb0578c0061275900b4ff2ffbe018fd039cb3ee9e (diff)
nvc0: keep track of cb bindings per buffer, use for upload settings
CB updates to bound buffers need to go through the CB_DATA endpoints, otherwise the shader may not notice that the updates happened. Furthermore, these updates have to go in to the same address as the bound buffer, otherwise, again, the shader may not notice updates. So we keep track of all the places where a constbuf is bound, and iterate over all of them when updating data. If a binding is found that encompasses the region to be updated, then we use the settings of that binding for the upload. Otherwise we upload as a regular data update. This fixes piglit 'arb_uniform_buffer_object-rendering offset' as well as blurriness in Witcher2. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91890 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.0" <[email protected]> (cherry picked from commit e50c01d5af305e07110cb4a38d5a655437058f04)
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_context.h')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_context.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_context.h b/src/gallium/drivers/nouveau/nouveau_context.h
index 24deb7ee4c0..decb2714ede 100644
--- a/src/gallium/drivers/nouveau/nouveau_context.h
+++ b/src/gallium/drivers/nouveau/nouveau_context.h
@@ -6,6 +6,8 @@
#define NOUVEAU_MAX_SCRATCH_BUFS 4
+struct nv04_resource;
+
struct nouveau_context {
struct pipe_context pipe;
struct nouveau_screen *screen;
@@ -23,8 +25,7 @@ struct nouveau_context {
unsigned, const void *);
/* base, size refer to the whole constant buffer */
void (*push_cb)(struct nouveau_context *,
- struct nouveau_bo *, unsigned domain,
- unsigned base, unsigned size,
+ struct nv04_resource *,
unsigned offset, unsigned words, const uint32_t *);
/* @return: @ref reduced by nr of references found in context */