summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_blit.c12
-rw-r--r--src/gallium/drivers/r300/r300_context.c18
-rw-r--r--src/gallium/drivers/r300/r300_context.h2
-rw-r--r--src/gallium/drivers/r300/r300_screen.c7
-rw-r--r--src/gallium/drivers/r600/r600.h1
-rw-r--r--src/gallium/drivers/r600/r600_blit.c6
-rw-r--r--src/gallium/drivers/r600/r600_buffer.c4
-rw-r--r--src/gallium/drivers/r600/r600_formats.h3
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c14
-rw-r--r--src/gallium/drivers/r600/r600_pipe.h1
10 files changed, 12 insertions, 56 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index 5b76c4b16e1..8d82bb920f6 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -62,15 +62,9 @@ static void r300_blitter_begin(struct r300_context* r300, enum r300_blitter_op o
util_blitter_save_fragment_shader(r300->blitter, r300->fs.state);
util_blitter_save_vertex_shader(r300->blitter, r300->vs_state.state);
util_blitter_save_viewport(r300->blitter, &r300->viewport);
- if (r300->vbuf_mgr) {
- util_blitter_save_vertex_buffers(r300->blitter, r300->vbuf_mgr->nr_vertex_buffers,
- r300->vbuf_mgr->vertex_buffer);
- util_blitter_save_vertex_elements(r300->blitter, r300->vbuf_mgr->vertex_elements);
- } else {
- util_blitter_save_vertex_buffers(r300->blitter, r300->nr_vertex_buffers,
- r300->vertex_buffer);
- util_blitter_save_vertex_elements(r300->blitter, r300->velems);
- }
+ util_blitter_save_vertex_buffers(r300->blitter, r300->nr_vertex_buffers,
+ r300->vertex_buffer);
+ util_blitter_save_vertex_elements(r300->blitter, r300->velems);
if (op & R300_SAVE_FRAMEBUFFER) {
util_blitter_save_framebuffer(r300->blitter, r300->fb_state.state);
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index cb8cef15134..e1330a42a1d 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -100,9 +100,6 @@ static void r300_destroy_context(struct pipe_context* context)
if (r300->draw)
draw_destroy(r300->draw);
- if (r300->vbuf_mgr)
- u_vbuf_destroy(r300->vbuf_mgr);
-
u_upload_destroy(r300->uploader);
/* XXX: This function assumes r300->query_list was initialized */
@@ -429,20 +426,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300->context.create_video_decoder = vl_create_decoder;
r300->context.create_video_buffer = vl_video_buffer_create;
- if (r300->screen->caps.has_tcl) {
- struct u_vbuf_caps caps;
-
- u_vbuf_get_caps(screen, &caps);
- caps.format_fixed32 = 0;
-
- r300->vbuf_mgr = u_vbuf_create(&r300->context, &caps, 1024 * 1024, 4,
- PIPE_BIND_VERTEX_BUFFER |
- PIPE_BIND_INDEX_BUFFER);
- if (!r300->vbuf_mgr)
- goto fail;
- }
-
- r300->uploader = u_upload_create(&r300->context, 256 * 1024, 16,
+ r300->uploader = u_upload_create(&r300->context, 256 * 1024, 4,
PIPE_BIND_INDEX_BUFFER);
r300->blitter = util_blitter_create(&r300->context);
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 8f125d19c16..ca57a5c7857 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -30,7 +30,6 @@
#include "pipe/p_context.h"
#include "util/u_inlines.h"
#include "util/u_transfer.h"
-#include "util/u_vbuf.h"
#include "r300_defines.h"
#include "r300_screen.h"
@@ -576,7 +575,6 @@ struct r300_context {
void *dsa_decompress_zmask;
- struct u_vbuf *vbuf_mgr;
struct pipe_index_buffer index_buffer;
struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
unsigned nr_vertex_buffers;
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 8c12865e9ce..0803a0808b5 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -361,10 +361,6 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
format == PIPE_FORMAT_R16G16_FLOAT ||
format == PIPE_FORMAT_R16G16B16_FLOAT ||
format == PIPE_FORMAT_R16G16B16A16_FLOAT;
- boolean is_fixed = format == PIPE_FORMAT_R32_FIXED ||
- format == PIPE_FORMAT_R32G32_FIXED ||
- format == PIPE_FORMAT_R32G32B32_FIXED ||
- format == PIPE_FORMAT_R32G32B32A32_FIXED;
if (!util_format_is_supported(format, usage))
return FALSE;
@@ -428,8 +424,7 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
if (usage & PIPE_BIND_VERTEX_BUFFER &&
/* Half float is supported on >= R400. */
(is_r400 || is_r500 || !is_half_float) &&
- /* We have a fallback for FIXED. */
- (is_fixed || r300_translate_vertex_data_type(format) != R300_INVALID_FORMAT)) {
+ r300_translate_vertex_data_type(format) != R300_INVALID_FORMAT) {
retval |= PIPE_BIND_VERTEX_BUFFER;
}
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h
index dd4fc009d3d..d95eadaa9c6 100644
--- a/src/gallium/drivers/r600/r600.h
+++ b/src/gallium/drivers/r600/r600.h
@@ -29,7 +29,6 @@
#include "../../winsys/radeon/drm/radeon_winsys.h"
#include "util/u_double_list.h"
#include "util/u_transfer.h"
-#include "util/u_vbuf.h"
#define R600_ERR(fmt, args...) \
fprintf(stderr, "EE %s:%d %s - "fmt, __FILE__, __LINE__, __func__, ##args)
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index a7a0d9dfc1c..1122f3ec9ce 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -55,13 +55,13 @@ static void r600_blitter_begin(struct pipe_context *ctx, enum r600_blitter_op op
util_blitter_save_rasterizer(rctx->blitter, rctx->states[R600_PIPE_STATE_RASTERIZER]);
util_blitter_save_fragment_shader(rctx->blitter, rctx->ps_shader);
util_blitter_save_vertex_shader(rctx->blitter, rctx->vs_shader);
- util_blitter_save_vertex_elements(rctx->blitter, rctx->vbuf_mgr->vertex_elements);
+ util_blitter_save_vertex_elements(rctx->blitter, rctx->vertex_elements);
if (rctx->states[R600_PIPE_STATE_VIEWPORT]) {
util_blitter_save_viewport(rctx->blitter, &rctx->viewport);
}
util_blitter_save_vertex_buffers(rctx->blitter,
- rctx->vbuf_mgr->nr_vertex_buffers,
- rctx->vbuf_mgr->vertex_buffer);
+ rctx->nr_vertex_buffers,
+ rctx->vertex_buffer);
util_blitter_save_so_targets(rctx->blitter, rctx->num_so_targets,
(struct pipe_stream_output_target**)rctx->so_targets);
diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c
index c22d36147df..cb3ea214cfe 100644
--- a/src/gallium/drivers/r600/r600_buffer.c
+++ b/src/gallium/drivers/r600/r600_buffer.c
@@ -106,8 +106,8 @@ static void *r600_buffer_transfer_map(struct pipe_context *pipe,
/* We changed the buffer, now we need to bind it where the old one was bound. */
/* Vertex buffers. */
- for (i = 0; i < rctx->vbuf_mgr->nr_vertex_buffers; i++) {
- if (rctx->vbuf_mgr->vertex_buffer[i].buffer == &rbuffer->b.b) {
+ for (i = 0; i < rctx->nr_vertex_buffers; i++) {
+ if (rctx->vertex_buffer[i].buffer == &rbuffer->b.b) {
r600_inval_vertex_cache(rctx);
r600_atom_dirty(rctx, &rctx->vertex_buffer_state);
}
diff --git a/src/gallium/drivers/r600/r600_formats.h b/src/gallium/drivers/r600/r600_formats.h
index af6de1cd797..6f5722851d4 100644
--- a/src/gallium/drivers/r600/r600_formats.h
+++ b/src/gallium/drivers/r600/r600_formats.h
@@ -101,7 +101,8 @@ static INLINE bool r600_is_vertex_format_supported(enum pipe_format format)
/* No fixed, no double. */
if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN ||
(desc->channel[i].size == 64 &&
- desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT))
+ desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT) ||
+ desc->channel[i].type == UTIL_FORMAT_TYPE_FIXED)
return false;
/* No scaled/norm formats with 32 bits per channel. */
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 7dfa2bfb3a7..062b94af720 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -192,9 +192,6 @@ static void r600_destroy_context(struct pipe_context *context)
free(rctx->states[i]);
}
- if (rctx->vbuf_mgr) {
- u_vbuf_destroy(rctx->vbuf_mgr);
- }
if (rctx->uploader) {
u_upload_destroy(rctx->uploader);
}
@@ -216,7 +213,6 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
{
struct r600_context *rctx = CALLOC_STRUCT(r600_context);
struct r600_screen* rscreen = (struct r600_screen *)screen;
- struct u_vbuf_caps vbuf_caps;
if (rctx == NULL)
return NULL;
@@ -298,16 +294,6 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
rctx->ws->cs_set_flush_callback(rctx->cs, r600_flush_from_winsys, rctx);
r600_emit_atom(rctx, &rctx->start_cs_cmd.atom);
- u_vbuf_get_caps(screen, &vbuf_caps);
- vbuf_caps.format_fixed32 = 0;
- rctx->vbuf_mgr = u_vbuf_create(&rctx->context, &vbuf_caps,
- 1024 * 1024, 256,
- PIPE_BIND_VERTEX_BUFFER |
- PIPE_BIND_INDEX_BUFFER |
- PIPE_BIND_CONSTANT_BUFFER);
- if (!rctx->vbuf_mgr)
- goto fail;
-
rctx->uploader = u_upload_create(&rctx->context, 1024 * 1024, 256,
PIPE_BIND_INDEX_BUFFER |
PIPE_BIND_CONSTANT_BUFFER);
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index 69f3644d8d2..450fcc4ccfe 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -284,7 +284,6 @@ struct r600_context {
struct r600_textures_info vs_samplers;
struct r600_textures_info ps_samplers;
- struct u_vbuf *vbuf_mgr;
struct u_upload_mgr *uploader;
struct util_slab_mempool pool_transfers;
boolean have_depth_texture, have_depth_fb;