summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-09-25 19:31:15 +0200
committerMarek Olšák <[email protected]>2011-09-26 15:25:04 +0200
commit315300e4443f7a2177f2d8c4435f30c9bf95504d (patch)
tree8ff7e2090dde22651c96491895ac33663c9808d5 /src
parent28fb79891101c23c75982726c81112caa96f9275 (diff)
u_vbuf_mgr: remove unused flag U_VBUF_UPLOAD_FLUSHED
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_vbuf_mgr.c24
-rw-r--r--src/gallium/auxiliary/util/u_vbuf_mgr.h3
2 files changed, 6 insertions, 21 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c b/src/gallium/auxiliary/util/u_vbuf_mgr.c
index 6bfbe865f69..6ed1d0b2b7e 100644
--- a/src/gallium/auxiliary/util/u_vbuf_mgr.c
+++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c
@@ -138,7 +138,7 @@ void u_vbuf_destroy(struct u_vbuf_mgr *mgrb)
}
-static enum u_vbuf_return_flags
+static void
u_vbuf_translate_begin(struct u_vbuf_priv *mgr,
int min_index, int max_index)
{
@@ -295,8 +295,6 @@ u_vbuf_translate_begin(struct u_vbuf_priv *mgr,
}
pipe_resource_reference(&out_buffer, NULL);
-
- return upload_flushed ? U_VBUF_UPLOAD_FLUSHED : 0;
}
static void u_vbuf_translate_end(struct u_vbuf_priv *mgr)
@@ -504,7 +502,7 @@ void u_vbuf_set_vertex_buffers(struct u_vbuf_mgr *mgrb,
mgr->b.nr_real_vertex_buffers = count;
}
-static enum u_vbuf_return_flags
+static void
u_vbuf_upload_buffers(struct u_vbuf_priv *mgr,
int min_index, int max_index,
unsigned instance_count)
@@ -512,7 +510,6 @@ u_vbuf_upload_buffers(struct u_vbuf_priv *mgr,
unsigned i, nr = mgr->ve->count;
unsigned count = max_index + 1 - min_index;
boolean uploaded[PIPE_MAX_ATTRIBS] = {0};
- enum u_vbuf_return_flags retval = 0;
for (i = 0; i < nr; i++) {
unsigned index = mgr->ve->ve[i].vertex_buffer_index;
@@ -551,14 +548,10 @@ u_vbuf_upload_buffers(struct u_vbuf_priv *mgr,
mgr->b.real_vertex_buffer[index].buffer_offset -= first;
uploaded[index] = TRUE;
- if (flushed)
- retval |= U_VBUF_UPLOAD_FLUSHED;
} else {
assert(mgr->b.real_vertex_buffer[index].buffer);
}
}
-
- return retval;
}
static void u_vbuf_compute_max_index(struct u_vbuf_priv *mgr)
@@ -607,7 +600,6 @@ u_vbuf_draw_begin(struct u_vbuf_mgr *mgrb,
{
struct u_vbuf_priv *mgr = (struct u_vbuf_priv*)mgrb;
int min_index, max_index;
- enum u_vbuf_return_flags retval = 0;
u_vbuf_compute_max_index(mgr);
@@ -620,20 +612,14 @@ u_vbuf_draw_begin(struct u_vbuf_mgr *mgrb,
/* Translate vertices with non-native layouts or formats. */
if (mgr->incompatible_vb_layout || mgr->ve->incompatible_layout) {
- retval |= u_vbuf_translate_begin(mgr, min_index, max_index);
-
- if (mgr->fallback_ve) {
- retval |= U_VBUF_BUFFERS_UPDATED;
- }
+ u_vbuf_translate_begin(mgr, min_index, max_index);
}
/* Upload user buffers. */
if (mgr->any_user_vbs) {
- retval |= u_vbuf_upload_buffers(mgr, min_index, max_index,
- info->instance_count);
- retval |= U_VBUF_BUFFERS_UPDATED;
+ u_vbuf_upload_buffers(mgr, min_index, max_index, info->instance_count);
}
- return retval;
+ return mgr->any_user_vbs || mgr->fallback_ve ? U_VBUF_BUFFERS_UPDATED : 0;
}
void u_vbuf_draw_end(struct u_vbuf_mgr *mgrb)
diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.h b/src/gallium/auxiliary/util/u_vbuf_mgr.h
index 0042ad1e81f..d854e4449b3 100644
--- a/src/gallium/auxiliary/util/u_vbuf_mgr.h
+++ b/src/gallium/auxiliary/util/u_vbuf_mgr.h
@@ -96,8 +96,7 @@ enum u_fetch_alignment {
};
enum u_vbuf_return_flags {
- U_VBUF_BUFFERS_UPDATED = 1,
- U_VBUF_UPLOAD_FLUSHED = 2
+ U_VBUF_BUFFERS_UPDATED = 1
};