summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_draw.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-10-22 16:47:38 -0600
committerBrian Paul <[email protected]>2013-10-24 10:45:47 -0600
commit8d7b913e4e089cc8b0b800cbcf80737d0be0a0f7 (patch)
tree6ed75cd73525ce7ac092acf96fa6ab6eddc94495 /src/gallium/drivers/svga/svga_draw.c
parent2f6a31508505744e5f1b3e4c35c2a1b305a813a8 (diff)
svga: remove user-space vertex/index buffer code
The gallium vbuf module, which we've been using for some time now, takes care of uploading user-space vertex/index data into real buffers. The upload code in the svga driver was unused. Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_draw.c')
-rw-r--r--src/gallium/drivers/svga/svga_draw.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c
index c0596ddacb6..a380334e900 100644
--- a/src/gallium/drivers/svga/svga_draw.c
+++ b/src/gallium/drivers/svga/svga_draw.c
@@ -42,18 +42,16 @@
#include "svga_cmd.h"
-struct svga_hwtnl *svga_hwtnl_create( struct svga_context *svga,
- struct u_upload_mgr *upload_ib,
- struct svga_winsys_context *swc )
+struct svga_hwtnl *
+svga_hwtnl_create(struct svga_context *svga)
{
struct svga_hwtnl *hwtnl = CALLOC_STRUCT(svga_hwtnl);
if (hwtnl == NULL)
goto fail;
hwtnl->svga = svga;
- hwtnl->upload_ib = upload_ib;
- hwtnl->cmd.swc = swc;
+ hwtnl->cmd.swc = svga->swc;
return hwtnl;
@@ -177,10 +175,8 @@ svga_hwtnl_flush( struct svga_hwtnl *hwtnl )
SVGA3dPrimitiveRange *prim;
unsigned i;
- /* Unmap upload manager vertex buffers */
- u_upload_unmap(svga->upload_vb);
-
for (i = 0; i < hwtnl->cmd.vdecl_count; i++) {
+ assert(!svga_buffer_is_user_buffer(hwtnl->cmd.vdecl_vb[i]));
handle = svga_buffer_handle(svga, hwtnl->cmd.vdecl_vb[i]);
if (handle == NULL)
return PIPE_ERROR_OUT_OF_MEMORY;
@@ -188,11 +184,9 @@ svga_hwtnl_flush( struct svga_hwtnl *hwtnl )
vb_handle[i] = handle;
}
- /* Unmap upload manager index buffers */
- u_upload_unmap(svga->upload_ib);
-
for (i = 0; i < hwtnl->cmd.prim_count; i++) {
if (hwtnl->cmd.prim_ib[i]) {
+ assert(!svga_buffer_is_user_buffer(hwtnl->cmd.prim_ib[i]));
handle = svga_buffer_handle(svga, hwtnl->cmd.prim_ib[i]);
if (handle == NULL)
return PIPE_ERROR_OUT_OF_MEMORY;