summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_vbuf.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-04-10 05:14:26 +0200
committerMarek Olšák <[email protected]>2012-04-24 01:39:22 +0200
commit7fe3631a7a0ad7602b4e947ac87ef86875c8bb3f (patch)
treec526a63498a4b98f65ee02998b0e9655c52ae602 /src/gallium/auxiliary/util/u_vbuf.h
parent978c1aa1d0f6fd9a188762a8534de33fc63eeea0 (diff)
u_vbuf: make use of the new CAPs to determine what to do
This adds the ability to initialize u_vbuf_caps before creating u_vbuf itself. It will be useful for determining if u_vbuf should be used or not. Also adapt r300g and r600g.
Diffstat (limited to 'src/gallium/auxiliary/util/u_vbuf.h')
-rw-r--r--src/gallium/auxiliary/util/u_vbuf.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf.h b/src/gallium/auxiliary/util/u_vbuf.h
index a17d64ae7ad..1c0562903f2 100644
--- a/src/gallium/auxiliary/util/u_vbuf.h
+++ b/src/gallium/auxiliary/util/u_vbuf.h
@@ -49,6 +49,9 @@ struct u_vbuf_caps {
/* Whether vertex fetches don't have to be dword-aligned. */
/* TRUE if hardware supports it. */
unsigned fetch_dword_unaligned:1;
+
+ /* Whether the driver supports user vertex buffers. */
+ unsigned user_vertex_buffers:1;
};
/* The manager.
@@ -69,26 +72,21 @@ struct u_vbuf {
* - u_upload_flush */
struct u_upload_mgr *uploader;
- struct u_vbuf_caps caps;
-
/* Vertex elements state as created by u_vbuf.
* This is used when saving the state into u_blitter, there's no other
* usage. */
void *vertex_elements;
};
-enum u_fetch_alignment {
- U_VERTEX_FETCH_BYTE_ALIGNED,
- U_VERTEX_FETCH_DWORD_ALIGNED
-};
+void u_vbuf_get_caps(struct pipe_screen *screen, struct u_vbuf_caps *caps);
struct u_vbuf *
u_vbuf_create(struct pipe_context *pipe,
+ struct u_vbuf_caps *caps,
unsigned upload_buffer_size,
unsigned upload_buffer_alignment,
- unsigned upload_buffer_bind,
- enum u_fetch_alignment fetch_alignment);
+ unsigned upload_buffer_bind);
void u_vbuf_destroy(struct u_vbuf *mgr);