search for: nr_cbufs

Displaying 20 results from an estimated 22 matches for "nr_cbufs".

Did you mean: nr_buf
2014 Jan 17
2
[PATCH] nv50, nvc0: only clear out the buffers that we were asked to clear
...EAR_BUFFERS_A; } if (buffers & PIPE_CLEAR_DEPTH) { @@ -425,12 +422,16 @@ nv50_clear(struct pipe_context *pipe, unsigned buffers, mode |= NV50_3D_CLEAR_BUFFERS_S; } - BEGIN_NV04(push, NV50_3D(CLEAR_BUFFERS), 1); - PUSH_DATA (push, mode); - - for (i = 1; i < fb->nr_cbufs; i++) { + if (mode) { BEGIN_NV04(push, NV50_3D(CLEAR_BUFFERS), 1); - PUSH_DATA (push, (i << 6) | 0x3c); + PUSH_DATA (push, mode); + } + + for (i = 0; i < fb->nr_cbufs; i++) { + if (buffers & (PIPE_CLEAR_COLOR0 << i)) { + BEGIN_NV04(push, NV5...
2009 Apr 08
0
[PATCH/Gallium] nv50: update nv50_clear to new interface
...een->tesla; @@ -37,21 +42,45 @@ nv50_clear(struct pipe_context *pipe, struct pipe_surface *ps, struct pipe_scissor_state sc, s_sc = nv50->scissor; unsigned dirty = nv50->dirty; + /* if 'no buffers' case is possible, change this to if/return */ + assert(buffers && (s_fb.nr_cbufs > 0 || s_fb.zsbuf != NULL)); + nv50->dirty = 0; + fb.nr_cbufs = 0; - if (ps->format == PIPE_FORMAT_Z24S8_UNORM || - ps->format == PIPE_FORMAT_Z16_UNORM) { - fb.nr_cbufs = 0; - fb.zsbuf = ps; + if (buffers & PIPE_CLEAR_COLOR) { + /* Should we clear all color buffers (nv40 d...
2014 Jan 23
2
[Mesa-dev] [PATCH] nv50, nvc0: only clear out the buffers that we were asked to clear
...gt; @@ -425,12 +422,16 @@ nv50_clear(struct pipe_context *pipe, unsigned buffers, >> mode |= NV50_3D_CLEAR_BUFFERS_S; >> } >> >> - BEGIN_NV04(push, NV50_3D(CLEAR_BUFFERS), 1); >> - PUSH_DATA (push, mode); >> - >> - for (i = 1; i < fb->nr_cbufs; i++) { >> + if (mode) { >> BEGIN_NV04(push, NV50_3D(CLEAR_BUFFERS), 1); >> - PUSH_DATA (push, (i << 6) | 0x3c); >> + PUSH_DATA (push, mode); >> + } >> + >> + for (i = 0; i < fb->nr_cbufs; i++) { >> + if (buffer...
2014 Jan 15
3
[PATCH] nv50, nvc0: don't crash on a null cbuf
...e.c index 86b9a23..7d330c9 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c @@ -20,9 +20,17 @@ nv50_validate_fb(struct nv50_context *nv50) PUSH_DATA (push, fb->height << 16); for (i = 0; i < fb->nr_cbufs; ++i) { - struct nv50_miptree *mt = nv50_miptree(fb->cbufs[i]->texture); - struct nv50_surface *sf = nv50_surface(fb->cbufs[i]); - struct nouveau_bo *bo = mt->base.bo; + struct nv50_miptree *mt; + struct nv50_surface *sf; + struct nouveau_bo *bo; + + /...
2012 Jan 10
5
[PATCH 0/4] nvfx: rework render temps code and fixes
This patch series silences some unknown cap warnings and fixes up coding style (patch 1+4). The most important part of this series are the two patches in the middle. They rework the state_fb code, so that we are able to render to not 64 byte aligned targets, as this is the only real use-case for render temporaries this allows us to drop temp code completely and simplifies a lot
2009 Apr 10
0
[PATCH/Gallium] nv50_clear again (might work better)
...nv50_clear(struct pipe_context *pipe, unsigned buffers, const float *rgba, double depth, unsigned stencil) @@ -40,26 +47,32 @@ nv50_clear(struct pipe_context *pipe, unsigned buffers, return; if (buffers & PIPE_CLEAR_COLOR) { - BEGIN_RING(chan, tesla, NV50TCL_CLEAR_COLOR(0), 4*fb->nr_cbufs); - for (i = 0; i < fb->nr_cbufs; i++) { - OUT_RING (chan, fui(rgba[0])); - OUT_RING (chan, fui(rgba[1])); - OUT_RING (chan, fui(rgba[2])); - OUT_RING (chan, fui(rgba[3])); - } - mode |= 0x3c; + assert(fb->nr_cbufs > 0); + BEGIN_RING(chan, tesla, NV50TCL_CLEAR_COLOR(0),...
2014 Jan 23
0
[Mesa-dev] [PATCH] nv50, nvc0: only clear out the buffers that we were asked to clear
...amp; PIPE_CLEAR_DEPTH) { > @@ -425,12 +422,16 @@ nv50_clear(struct pipe_context *pipe, unsigned buffers, > mode |= NV50_3D_CLEAR_BUFFERS_S; > } > > - BEGIN_NV04(push, NV50_3D(CLEAR_BUFFERS), 1); > - PUSH_DATA (push, mode); > - > - for (i = 1; i < fb->nr_cbufs; i++) { > + if (mode) { > BEGIN_NV04(push, NV50_3D(CLEAR_BUFFERS), 1); > - PUSH_DATA (push, (i << 6) | 0x3c); > + PUSH_DATA (push, mode); > + } > + > + for (i = 0; i < fb->nr_cbufs; i++) { > + if (buffers & (PIPE_CLEAR_COLOR0 <&...
2014 Jan 23
0
[Mesa-dev] [PATCH] nv50, nvc0: only clear out the buffers that we were asked to clear
...50_clear(struct pipe_context *pipe, unsigned buffers, >>> mode |= NV50_3D_CLEAR_BUFFERS_S; >>> } >>> >>> - BEGIN_NV04(push, NV50_3D(CLEAR_BUFFERS), 1); >>> - PUSH_DATA (push, mode); >>> - >>> - for (i = 1; i < fb->nr_cbufs; i++) { >>> + if (mode) { >>> BEGIN_NV04(push, NV50_3D(CLEAR_BUFFERS), 1); >>> - PUSH_DATA (push, (i << 6) | 0x3c); >>> + PUSH_DATA (push, mode); >>> + } >>> + >>> + for (i = 0; i < fb->nr_cbufs; i++)...
2014 Feb 13
2
[PATCH] nv50: make sure to clear _all_ layers of all attachments
...BEGIN_NV04(push, NV50_3D(VIEWPORT_HORIZ(0)), 2); PUSH_DATA (push, (width << 16) | dstx); PUSH_DATA (push, (height << 16) | dsty); @@ -402,6 +405,14 @@ nv50_clear(struct pipe_context *pipe, unsigned buffers, if (!nv50_state_validate(nv50, NV50_NEW_FRAMEBUFFER, 9 + (fb->nr_cbufs * 2))) return; + /* We have to clear ALL of the layers, not up to the min number of layers + * of any attachment. Don't touch 3d textures, they can't be arrays. The + * above nv50_state_validate call will have written to rt_array_mode. */ + if (!(nv50->rt_array_mode &a...
2014 Jan 23
2
[PATCH v2] nv50, nvc0: clear out RT on a null cbuf
...PUSH_DATA (push, 64); > + PUSH_DATA (push, 0); > +} > > static void > nv50_validate_fb(struct nv50_context *nv50) > @@ -20,9 +33,18 @@ nv50_validate_fb(struct nv50_context *nv50) > PUSH_DATA (push, fb->height << 16); > > for (i = 0; i < fb->nr_cbufs; ++i) { > - struct nv50_miptree *mt = nv50_miptree(fb->cbufs[i]->texture); > - struct nv50_surface *sf = nv50_surface(fb->cbufs[i]); > - struct nouveau_bo *bo = mt->base.bo; > + struct nv50_miptree *mt; > + struct nv50_surface *sf; > + str...
2009 Jul 12
0
[PATCH 2/3] nv50: fix viewport transform
...allium/drivers/nv50/nv50_state_validate.c +++ b/src/gallium/drivers/nv50/nv50_state_validate.c @@ -31,6 +31,11 @@ nv50_state_validate_fb(struct nv50_context *nv50) struct pipe_framebuffer_state *fb = &nv50->framebuffer; unsigned i, w, h, gw = 0; + nv50->fb_invert_y = 0; + if (fb->nr_cbufs && (fb->cbufs[0]->texture->tex_usage & + PIPE_TEXTURE_USAGE_DISPLAY_TARGET)) + nv50->fb_invert_y = fb->cbufs[0]->height; + for (i = 0; i < fb->nr_cbufs; i++) { struct pipe_texture *pt = fb->cbufs[i]->texture; struct nouveau_bo *bo = nv50_mip...
2014 Jan 17
0
[PATCH v2] nv50, nvc0: clear out RT on a null cbuf
...EGIN_NV04(push, NV50_3D(RT_HORIZ(i)), 2); + PUSH_DATA (push, 64); + PUSH_DATA (push, 0); +} static void nv50_validate_fb(struct nv50_context *nv50) @@ -20,9 +33,18 @@ nv50_validate_fb(struct nv50_context *nv50) PUSH_DATA (push, fb->height << 16); for (i = 0; i < fb->nr_cbufs; ++i) { - struct nv50_miptree *mt = nv50_miptree(fb->cbufs[i]->texture); - struct nv50_surface *sf = nv50_surface(fb->cbufs[i]); - struct nouveau_bo *bo = mt->base.bo; + struct nv50_miptree *mt; + struct nv50_surface *sf; + struct nouveau_bo *bo; + + i...
2014 Jan 23
0
[PATCH v2] nv50, nvc0: clear out RT on a null cbuf
...+ PUSH_DATA (push, 0); >> +} >> >> static void >> nv50_validate_fb(struct nv50_context *nv50) >> @@ -20,9 +33,18 @@ nv50_validate_fb(struct nv50_context *nv50) >> PUSH_DATA (push, fb->height << 16); >> >> for (i = 0; i < fb->nr_cbufs; ++i) { >> - struct nv50_miptree *mt = nv50_miptree(fb->cbufs[i]->texture); >> - struct nv50_surface *sf = nv50_surface(fb->cbufs[i]); >> - struct nouveau_bo *bo = mt->base.bo; >> + struct nv50_miptree *mt; >> + struct nv50_surface...
2014 Jun 18
1
[PATCH 1/2] nv30: tidy screen caps, add missing ones
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- src/gallium/drivers/nouveau/nv30/nv30_screen.c | 33 +++++++++++++------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c index 4baabaf..5c3d783 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c +++
2015 May 24
2
[PATCH 1/2] nv30: avoid doing extra work on clear and hitting unexpected states
...pipe_framebuffer_state *fb = &nv30->framebuffer; uint32_t colr = 0, zeta = 0, mode = 0; - if (!nv30_state_validate(nv30, TRUE)) + if (!nv30_state_validate(nv30, NV30_NEW_FRAMEBUFFER | NV30_NEW_SCISSOR, TRUE)) return; if (buffers & PIPE_CLEAR_COLOR && fb->nr_cbufs) { diff --git a/src/gallium/drivers/nouveau/nv30/nv30_context.h b/src/gallium/drivers/nouveau/nv30/nv30_context.h index 7b32aae..592cdbe 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_context.h +++ b/src/gallium/drivers/nouveau/nv30/nv30_context.h @@ -204,7 +204,7 @@ void nv30_render_vbo(struc...
2014 Jan 13
20
[PATCH 00/19] nv50: add sampler2DMS/GP support to get OpenGL 3.2
OK, so there's a bunch of stuff in here. The geometry stuff is based on the work started by Bryan Cain and Christoph Bumiller. Patches 01-12: Add support for geometry shaders and fix related issues Patches 13-14: Make it possible for fb clears to operate on texture attachments with an explicit layer set (as is allowed in gl 3.2). Patches 15-17: Make ARB_texture_multisample work
2009 Aug 25
3
[Bug 23505] New: KDE's Kubrick has problems with xf86-video-nouveau driver
http://bugs.freedesktop.org/show_bug.cgi?id=23505 Summary: KDE's Kubrick has problems with xf86-video-nouveau driver Product: Mesa Version: git Platform: Other OS/Version: All Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/nouveau AssignedTo: nouveau at
2016 Jun 05
0
[RFC PATCH] nouveau: add locking
...;t affect CLEAR_BUFFERS */ - if (!nvc0_state_validate_3d(nvc0, NVC0_NEW_3D_FRAMEBUFFER)) + if (!nvc0_state_validate_3d(nvc0, NVC0_NEW_3D_FRAMEBUFFER)) { + pipe_mutex_unlock(nvc0->screen->base.push_mutex); return; + } if (buffers & PIPE_CLEAR_COLOR && fb->nr_cbufs) { BEGIN_NVC0(push, NVC0_3D(CLEAR_COLOR(0)), 4); @@ -755,6 +784,8 @@ nvc0_clear(struct pipe_context *pipe, unsigned buffers, (j << NVC0_3D_CLEAR_BUFFERS_LAYER__SHIFT)); } } + + pipe_mutex_unlock(nvc0->screen->base.push_mutex); } @@ -1148,8 +...
2014 Nov 27
0
[Mesa-dev] [RFC] tegra: Initial support
...> +{ > + struct tegra_context *context = to_tegra_context(pcontext); > + struct pipe_framebuffer_state state; > + unsigned i; > + > + if (fb) { > + memcpy(&state, fb, sizeof(state)); > + > + for (i = 0; i < fb->nr_cbufs; i++) > + state.cbufs[i] = tegra_surface_unwrap(fb->cbufs[i]); > + > + while (i < PIPE_MAX_COLOR_BUFS) > + state.cbufs[i++] = NULL; > + > + state.zsbuf = tegra_surface_unwrap(fb->zsbuf); > + > +...
2014 Nov 27
7
[RFC] tegra: Initial support
...mebuffer_state(struct pipe_context *pcontext, + const struct pipe_framebuffer_state *fb) +{ + struct tegra_context *context = to_tegra_context(pcontext); + struct pipe_framebuffer_state state; + unsigned i; + + if (fb) { + memcpy(&state, fb, sizeof(state)); + + for (i = 0; i < fb->nr_cbufs; i++) + state.cbufs[i] = tegra_surface_unwrap(fb->cbufs[i]); + + while (i < PIPE_MAX_COLOR_BUFS) + state.cbufs[i++] = NULL; + + state.zsbuf = tegra_surface_unwrap(fb->zsbuf); + + fb = &state; + } + + context->gpu->set_framebuffer_state(context->gpu, fb); +} + +static vo...