diff options
author | Eric Anholt <[email protected]> | 2014-08-22 10:34:55 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-08-24 22:13:25 -0700 |
commit | bbbe3b65adee44c164532d7afb4ff8fd8f88bbf4 (patch) | |
tree | 69e2a96411c4e1190cf426c70559fd82765aaaa5 /src/gallium/auxiliary/util/u_vbuf.h | |
parent | 306e421887720b149be77c749108bcffcebe34f6 (diff) |
u_vbuf: Simplify the format fallback translation.
Individual caps made supporting new fallbacks more complicated than it
needed to be. Instead, just make a table of fallbacks at context init
time.
v2: Fix inverted "do we need to install vbuf?" flagging caught by Marek.
Reviewed-by: Marek Olšák <[email protected]> (v2)
Diffstat (limited to 'src/gallium/auxiliary/util/u_vbuf.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_vbuf.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf.h b/src/gallium/auxiliary/util/u_vbuf.h index a608184e596..9e8b135fb79 100644 --- a/src/gallium/auxiliary/util/u_vbuf.h +++ b/src/gallium/auxiliary/util/u_vbuf.h @@ -35,19 +35,14 @@ #include "pipe/p_context.h" #include "pipe/p_state.h" +#include "pipe/p_format.h" struct cso_context; struct u_vbuf; /* Hardware vertex fetcher limitations can be described by this structure. */ struct u_vbuf_caps { - /* Vertex format CAPs. */ - /* TRUE if hardware supports it. */ - unsigned format_fixed32:1; /* PIPE_FORMAT_*32*_FIXED */ - unsigned format_float16:1; /* PIPE_FORMAT_*16*_FLOAT */ - unsigned format_float64:1; /* PIPE_FORMAT_*64*_FLOAT */ - unsigned format_norm32:1; /* PIPE_FORMAT_*32*NORM */ - unsigned format_scaled32:1; /* PIPE_FORMAT_*32*SCALED */ + enum pipe_format format_translation[PIPE_FORMAT_COUNT]; /* Whether vertex fetches don't have to be 4-byte-aligned. */ /* TRUE if hardware supports it. */ @@ -60,7 +55,7 @@ struct u_vbuf_caps { }; -void u_vbuf_get_caps(struct pipe_screen *screen, struct u_vbuf_caps *caps); +boolean u_vbuf_get_caps(struct pipe_screen *screen, struct u_vbuf_caps *caps); struct u_vbuf * u_vbuf_create(struct pipe_context *pipe, |