Displaying 20 results from an estimated 62 matches for "cbuf".
Did you mean:
buf
2014 Jan 15
3
[PATCH] nv50, nvc0: don't crash on a null cbuf
...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;
+
+...
2020 Mar 19
0
[nbdkit PATCH 1/2] sh, eval: Cache .can_zero and .can_flush
...CLEANUP_FREE char *s = NULL;
size_t slen;
int64_t r;
@@ -307,9 +323,9 @@ sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
{
const char *method = "pread";
const char *script = get_script (method);
- char *h = handle;
+ struct sh_handle *h = handle;
char cbuf[32], obuf[32];
- const char *args[] = { script, method, h, cbuf, obuf, NULL };
+ const char *args[] = { script, method, h->h, cbuf, obuf, NULL };
CLEANUP_FREE char *data = NULL;
size_t len;
@@ -395,9 +411,9 @@ sh_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset,
{...
2014 Jan 23
2
[PATCH v2] nv50, nvc0: clear out RT on a null cbuf
...SH_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;
> + st...
2014 Jan 17
0
[PATCH v2] nv50, nvc0: clear out RT on a null cbuf
...N_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;
+
+...
2018 Dec 15
0
[PATCH nbdkit v2 3/4] sh: Switch nbdkit-sh-plugin to use API version 2.
...n.h>
#include "call.h"
@@ -360,7 +363,8 @@ sh_get_size (void *handle)
}
static int
-sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset)
+sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
+ uint32_t flags)
{
char *h = handle;
char cbuf[32], obuf[32];
@@ -403,16 +407,53 @@ sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset)
}
}
+/* Convert NBDKIT_FLAG_* to flags string. */
+static void flag_append (const char *str, bool *comma, char **buf, size_t *len);
+
+static void
+flags_string (uint32_t flags, char *buf,...
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...
2018 Dec 14
0
[PATCH nbdkit 2/3] sh: Switch nbdkit-sh-plugin to use API version 2.
...n.h>
#include "call.h"
@@ -360,7 +362,8 @@ sh_get_size (void *handle)
}
static int
-sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset)
+sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
+ uint32_t flags)
{
char *h = handle;
char cbuf[32], obuf[32];
@@ -404,12 +407,14 @@ sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset)
}
static int
-sh_pwrite (void *handle, const void *buf,
- uint32_t count, uint64_t offset)
+sh_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset,
+...
2020 Mar 19
5
[nbdkit PATCH 0/2] More caching of initial setup
When I added .can_FOO caching in 1.16, I missed the case that the sh
plugin itself was calling .can_flush twice in some situations (in
order to default .can_fua). Then right after, I regressed it to call
.can_zero twice (in order to default .can_fast_zero). I also missed
that .thread_model could use better caching, because at the time, I
did not add testsuite coverage. Fix that now.
Eric Blake
2013 Feb 15
1
[PATCH] btrfs: use kmalloc for lzo de/compress buffer
...oc.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/sched.h>
@@ -40,9 +39,9 @@ static void lzo_free_workspace(struct list_head *ws)
{
struct workspace *workspace = list_entry(ws, struct workspace, list);
- vfree(workspace->buf);
- vfree(workspace->cbuf);
- vfree(workspace->mem);
+ kfree(workspace->buf);
+ kfree(workspace->cbuf);
+ kfree(workspace->mem);
kfree(workspace);
}
@@ -54,9 +53,10 @@ static struct list_head *lzo_alloc_workspace(void)
if (!workspace)
return ERR_PTR(-ENOMEM);
- workspace->mem = vmalloc(LZO1X_MEM_C...
2018 Dec 15
5
[PATCH nbdkit v2 0/4] tests: Test export flags (eflags).
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-December/thread.html#00123
v2:
- Document "-" instead of "script=-" and use it in the test; and
verify this also works on FreeBSD; and verify that it doesn't
depend on the particular behaviour of our wrapper script and should
work with installed nbdkit too.
- Fix handling of zero flags parameter.
-
2008 Mar 17
1
Inconsistency in gsub in R.2.6.2 (PR#10978)
Hi,
May this be an oversight?
R version 2.6.2 Patched (2008-03-13 r44783)
Copyright (C) 2008 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
...
> x <- "ab?"
> Encoding(x)
[1] "latin1"
> Encoding(gsub("?","", x))
[1] "unknown"
> Encoding(gsub("?","", x, perl = TRUE))
[1] "latin1"
2009 Jun 21
0
[PATCH] nv50: don't allocate in the param buffer
...ex 75c5cea..28a9f2a 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -2433,7 +2433,7 @@ static void
nv50_program_validate_data(struct nv50_context *nv50, struct nv50_program *p)
{
struct pipe_screen *pscreen = nv50->pipe.screen;
- unsigned cbuf, start, count;
+ unsigned cbuf, count;
if (!p->data[0] && p->immd_nr) {
struct nouveau_resource *heap = nv50->screen->immd_heap[0];
@@ -2457,23 +2457,10 @@ nv50_program_validate_data(struct nv50_context *nv50, struct nv50_program *p)
if (!p->param_nr)
return;
-...
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
2018 Dec 14
6
[PATCH nbdkit 0/3] tests: Test export flags (eflags).
Some feature additions to the shell script plugin allow us to test the
export flags field reasonably easily.
Rich.
2014 Jan 23
2
[Mesa-dev] [PATCH] nv50, nvc0: only clear out the buffers that we were asked to clear
...FERS_R | NV50_3D_CLEAR_BUFFERS_G |
>> - NV50_3D_CLEAR_BUFFERS_B | NV50_3D_CLEAR_BUFFERS_A;
>> }
>>
> I'm not sure why you've dropped the mode from above. I'm guessing that
> the initial assumption was that if there is a color buffer it must be at
> cbuf[0].
Because I cleared the cbufs separately in a for loop below (the 0x3c
== the RGBA mask). The first RT may not have been there, and that
seemed simpler than the thing that I have now (as evidenced by the
code I have now which has more complex logic).
>
> The corrected version in your gith...
2019 May 10
0
[nbdkit PATCH 6/9] sh: Implement .cache script callback
...n_cache");
+}
+
static int
sh_flush (void *handle, uint32_t flags)
{
@@ -782,6 +788,38 @@ sh_extents (void *handle, uint32_t count, uint64_t offset, uint32_t flags,
}
}
+static int
+sh_cache (void *handle, uint32_t count, uint64_t offset, uint32_t flags)
+{
+ char *h = handle;
+ char cbuf[32], obuf[32];
+ const char *args[] = { script, "cache", h, cbuf, obuf, NULL };
+
+ snprintf (cbuf, sizeof cbuf, "%" PRIu32, count);
+ snprintf (obuf, sizeof obuf, "%" PRIu64, offset);
+ assert (!flags);
+
+ switch (call (args)) {
+ case OK:
+ return 0;
+
+ c...
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
+++
2019 May 16
0
[nbdkit PATCH v2 07/24] sh: Implement .cache script callback
...abort ();
+ }
+}
+
static int
sh_flush (void *handle, uint32_t flags)
{
@@ -782,6 +829,38 @@ sh_extents (void *handle, uint32_t count, uint64_t offset, uint32_t flags,
}
}
+static int
+sh_cache (void *handle, uint32_t count, uint64_t offset, uint32_t flags)
+{
+ char *h = handle;
+ char cbuf[32], obuf[32];
+ const char *args[] = { script, "cache", h, cbuf, obuf, NULL };
+
+ snprintf (cbuf, sizeof cbuf, "%" PRIu32, count);
+ snprintf (obuf, sizeof obuf, "%" PRIu64, offset);
+ assert (!flags);
+
+ switch (call (args)) {
+ case OK:
+ return 0;
+
+ c...
2009 Jul 12
0
[PATCH 2/3] nv50: fix viewport transform
...ium/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_mi...
2007 Sep 13
1
chartr better
...trs_old = Calloc(1, struct wtr_spec);
trs_old->type = WTR_INIT;
trs_old->next = NULL;
@@ -2084,6 +2098,7 @@
if(nc < 0) error(_("invalid multibyte string 'old'"));
wc = (wchar_t *) R_AllocStringBuffer((nc+1)*sizeof(wchar_t), &cbuff);
mbstowcs(wc, s, nc + 1);
+ wtr_build_spec(wc, trs_cnt); /* use count only */
wtr_build_spec(wc, trs_old);
s = translateChar(STRING_ELT(_new, 0));
@@ -2096,38 +2111,54 @@
/* Initialize the pointers for walking through the old and new
wtr_spec...