Commit a79f6a4a authored by Keith Whitwell's avatar Keith Whitwell

svga: convert to use pipe_resrource

As with others so far, a fairly shallow conversion.
parent 087fb544
......@@ -27,8 +27,6 @@ C_SOURCES = \
svga_pipe_vertex.c \
svga_pipe_vs.c \
svga_screen.c \
svga_screen_buffer.c \
svga_screen_texture.c \
svga_screen_cache.c \
svga_state.c \
svga_state_need_swtnl.c \
......@@ -45,7 +43,14 @@ C_SOURCES = \
svga_tgsi.c \
svga_tgsi_decl_sm20.c \
svga_tgsi_decl_sm30.c \
svga_tgsi_insn.c
svga_tgsi_insn.c \
svga_sampler_view.c \
svga_surface.c \
svga_resource.c \
svga_resource_texture.c \
svga_resource_buffer.c \
svga_resource_buffer_upload.c
LIBRARY_INCLUDES = \
-I$(TOP)/src/gallium/drivers/svga/include
......
......@@ -31,8 +31,9 @@
*/
#include "svga_winsys.h"
#include "svga_screen_buffer.h"
#include "svga_screen_texture.h"
#include "svga_resource_buffer.h"
#include "svga_resource_texture.h"
#include "svga_surface.h"
#include "svga_cmd.h"
/*
......@@ -423,7 +424,7 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc,
const SVGA3dCopyBox *boxes, // IN
uint32 numBoxes) // IN
{
struct svga_resource *resource = svga_texture(st->base.resource);
struct svga_texture *texture = svga_texture(st->base.resource);
SVGA3dCmdSurfaceDMA *cmd;
SVGA3dCmdSurfaceDMASuffix *pSuffix;
uint32 boxesSize = sizeof *boxes * numBoxes;
......@@ -454,8 +455,8 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc,
cmd->guest.pitch = st->base.stride;
swc->surface_relocation(swc, &cmd->host.sid, texture->handle, surface_flags);
cmd->host.face = st->base.face; /* PIPE_TEX_FACE_* and SVGA3D_CUBEFACE_* match */
cmd->host.mipmap = st->base.level;
cmd->host.face = st->base.sr.face; /* PIPE_TEX_FACE_* and SVGA3D_CUBEFACE_* match */
cmd->host.mipmap = st->base.sr.level;
cmd->transfer = transfer;
......
......@@ -34,8 +34,9 @@
#include "svga_context.h"
#include "svga_screen.h"
#include "svga_screen_texture.h"
#include "svga_screen_buffer.h"
#include "svga_resource_texture.h"
#include "svga_resource_buffer.h"
#include "svga_resource.h"
#include "svga_winsys.h"
#include "svga_swtnl.h"
#include "svga_draw.h"
......@@ -71,59 +72,6 @@ static void svga_destroy( struct pipe_context *pipe )
FREE( svga );
}
static unsigned int
svga_is_texture_referenced( struct pipe_context *pipe,
struct pipe_texture *texture,
unsigned face, unsigned level)
{
struct svga_texture *tex = svga_texture(texture);
struct svga_screen *ss = svga_screen(pipe->screen);
/**
* The screen does not cache texture writes.
*/
if (!tex->handle || ss->sws->surface_is_flushed(ss->sws, tex->handle))
return PIPE_UNREFERENCED;
/**
* sws->surface_is_flushed() does not distinguish between read references
* and write references. So assume a reference is both.
*/
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
}
static unsigned int
svga_is_buffer_referenced( struct pipe_context *pipe,
struct pipe_buffer *buf)
{
struct svga_screen *ss = svga_screen(pipe->screen);
struct svga_buffer *sbuf = svga_buffer(buf);
/**
* XXX: Check this.
* The screen may cache buffer writes, but when we map, we map out
* of those cached writes, so we don't need to set a
* PIPE_REFERENCED_FOR_WRITE flag for cached buffers.
*/
if (!sbuf->handle || ss->sws->surface_is_flushed(ss->sws, sbuf->handle))
return PIPE_UNREFERENCED;
/**
* sws->surface_is_flushed() does not distinguish between read references
* and write references. So assume a reference is both,
* however, we make an exception for index- and vertex buffers, to avoid
* a flush in st_bufferobj_get_subdata, during display list replay.
*/
if (sbuf->base.usage & (PIPE_BUFFER_USAGE_VERTEX | PIPE_BUFFER_USAGE_INDEX))
return PIPE_REFERENCED_FOR_READ;
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
}
struct pipe_context *svga_context_create( struct pipe_screen *screen,
......@@ -147,14 +95,7 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
if(!svga->swc)
goto no_swc;
/*
svga->rm_context = rm_create_context( &svga->base,
svgascreen->rm_screen,
&svga_rm_context_callbacks );
svga_init_resource_functions(svga);
*/
svga_init_texture_functions(&svga->pipe);
svga_init_blend_functions(svga);
svga_init_blit_functions(svga);
svga_init_depth_stencil_functions(svga);
......@@ -187,14 +128,14 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
if (svga->vs_bm == NULL)
goto no_vs_bm;
svga->upload_ib = u_upload_create( svga->pipe.screen,
svga->upload_ib = u_upload_create( &svga->pipe,
32 * 1024,
16,
PIPE_BUFFER_USAGE_INDEX );
if (svga->upload_ib == NULL)
goto no_upload_ib;
svga->upload_vb = u_upload_create( svga->pipe.screen,
svga->upload_vb = u_upload_create( &svga->pipe,
128 * 1024,
16,
PIPE_BUFFER_USAGE_VERTEX );
......
......@@ -254,7 +254,7 @@ struct svga_hw_clear_state
struct svga_hw_view_state
{
struct pipe_texture *texture;
struct pipe_resource *texture;
struct svga_sampler_view *v;
unsigned min_lod;
unsigned max_lod;
......
......@@ -34,8 +34,9 @@
#include "svga_draw_private.h"
#include "svga_debug.h"
#include "svga_screen.h"
#include "svga_screen_buffer.h"
#include "svga_screen_texture.h"
#include "svga_resource_buffer.h"
#include "svga_resource_texture.h"
#include "svga_surface.h"
#include "svga_winsys.h"
#include "svga_cmd.h"
......@@ -103,7 +104,7 @@ void svga_hwtnl_reset_vdecl( struct svga_hwtnl *hwtnl,
assert(hwtnl->cmd.prim_count == 0);
for (i = count; i < hwtnl->cmd.vdecl_count; i++) {
pipe_buffer_reference(&hwtnl->cmd.vdecl_vb[i],
pipe_resource_reference(&hwtnl->cmd.vdecl_vb[i],
NULL);
}
......@@ -209,7 +210,7 @@ svga_hwtnl_flush( struct svga_hwtnl *hwtnl )
&prim[i].indexArray.surfaceId,
ib_handle[i],
PIPE_BUFFER_USAGE_GPU_READ);
pipe_buffer_reference(&hwtnl->cmd.prim_ib[i], NULL);
pipe_resource_reference(&hwtnl->cmd.prim_ib[i], NULL);
}
SVGA_FIFOCommitAll( swc );
......@@ -240,7 +241,7 @@ enum pipe_error svga_hwtnl_prim( struct svga_hwtnl *hwtnl,
unsigned i;
for (i = 0; i < hwtnl->cmd.vdecl_count; i++) {
struct pipe_resource *vb = hwtnl->cmd.vdecl_vb[i];
unsigned size = vb ? vb->size : 0;
unsigned size = vb ? vb->width0 : 0;
unsigned offset = hwtnl->cmd.vdecl[i].array.offset;
unsigned stride = hwtnl->cmd.vdecl[i].array.stride;
unsigned index_bias = range->indexBias;
......@@ -323,7 +324,7 @@ enum pipe_error svga_hwtnl_prim( struct svga_hwtnl *hwtnl,
assert(range->indexWidth == range->indexArray.stride);
if(ib) {
unsigned size = ib->size;
unsigned size = ib->width0;
unsigned offset = range->indexArray.offset;
unsigned stride = range->indexArray.stride;
unsigned count;
......@@ -374,7 +375,7 @@ enum pipe_error svga_hwtnl_prim( struct svga_hwtnl *hwtnl,
hwtnl->cmd.prim[hwtnl->cmd.prim_count] = *range;
pipe_buffer_reference(&hwtnl->cmd.prim_ib[hwtnl->cmd.prim_count], ib);
pipe_resource_reference(&hwtnl->cmd.prim_ib[hwtnl->cmd.prim_count], ib);
hwtnl->cmd.prim_count++;
return ret;
......
......@@ -98,7 +98,7 @@ static enum pipe_error retrieve_or_generate_indices( struct svga_hwtnl *hwtnl,
unsigned gen_nr,
unsigned gen_size,
u_generate_func generate,
struct pipe_buffer **out_buf )
struct pipe_resource **out_buf )
{
enum pipe_error ret = PIPE_OK;
int i;
......@@ -119,7 +119,7 @@ static enum pipe_error retrieve_or_generate_indices( struct svga_hwtnl *hwtnl,
}
else if (gen_type == U_GENERATE_REUSABLE)
{
pipe_buffer_reference( &hwtnl->index_cache[prim][i].buffer,
pipe_resource_reference( &hwtnl->index_cache[prim][i].buffer,
NULL );
if (DBG)
......@@ -151,7 +151,7 @@ static enum pipe_error retrieve_or_generate_indices( struct svga_hwtnl *hwtnl,
assert (smallest != IDX_CACHE_MAX);
pipe_buffer_reference( &hwtnl->index_cache[prim][smallest].buffer,
pipe_resource_reference( &hwtnl->index_cache[prim][smallest].buffer,
NULL );
if (DBG)
......@@ -173,7 +173,7 @@ static enum pipe_error retrieve_or_generate_indices( struct svga_hwtnl *hwtnl,
hwtnl->index_cache[prim][i].generate = generate;
hwtnl->index_cache[prim][i].gen_nr = gen_nr;
pipe_buffer_reference( &hwtnl->index_cache[prim][i].buffer,
pipe_resource_reference( &hwtnl->index_cache[prim][i].buffer,
*out_buf );
if (DBG)
......@@ -261,7 +261,7 @@ svga_hwtnl_draw_arrays( struct svga_hwtnl *hwtnl,
return simple_draw_arrays( hwtnl, gen_prim, start, count );
}
else {
struct pipe_buffer *gen_buf = NULL;
struct pipe_resource *gen_buf = NULL;
/* Need to draw as indexed primitive.
* Potentially need to run the gen func to build an index buffer.
......@@ -290,7 +290,7 @@ svga_hwtnl_draw_arrays( struct svga_hwtnl *hwtnl,
done:
if (gen_buf)
pipe_buffer_reference( &gen_buf, NULL );
pipe_resource_reference( &gen_buf, NULL );
return ret;
}
......
......@@ -30,7 +30,7 @@
#include "svga_cmd.h"
#include "svga_draw.h"
#include "svga_draw_private.h"
#include "svga_screen_buffer.h"
#include "svga_resource_buffer.h"
#include "svga_winsys.h"
#include "svga_context.h"
......@@ -39,22 +39,22 @@
static enum pipe_error
translate_indices( struct svga_hwtnl *hwtnl,
struct pipe_buffer *src,
struct pipe_resource *src,
unsigned offset,
unsigned nr,
unsigned index_size,
u_translate_func translate,
struct pipe_buffer **out_buf )
struct pipe_resource **out_buf )
{
struct pipe_context *pipe = &hwtnl->svga->pipe;
struct pipe_transfer *src_transfer = NULL;
struct pipe_transfer *dst_transfer = NULL;
unsigned size = index_size * nr;
const void *src_map = NULL;
struct pipe_buffer *dst = NULL;
struct pipe_resource *dst = NULL;
void *dst_map = NULL;
dst = pipe_buffer_create( screen, 32,
dst = pipe_buffer_create( pipe->screen, 32,
PIPE_BUFFER_USAGE_INDEX |
PIPE_BUFFER_USAGE_CPU_WRITE |
PIPE_BUFFER_USAGE_GPU_READ,
......@@ -99,7 +99,7 @@ fail:
enum pipe_error
svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
struct pipe_buffer *index_buffer,
struct pipe_resource *index_buffer,
unsigned index_size,
unsigned min_index,
unsigned max_index,
......@@ -108,7 +108,7 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
unsigned count,
unsigned bias )
{
struct pipe_buffer *upload_buffer = NULL;
struct pipe_resource *upload_buffer = NULL;
SVGA3dPrimitiveRange range;
unsigned hw_prim;
unsigned hw_count;
......@@ -122,7 +122,7 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
if (index_buffer &&
svga_buffer_is_user_buffer(index_buffer))
{
assert( index_buffer->size >= index_offset + count * index_size );
assert( index_buffer->width0 >= index_offset + count * index_size );
ret = u_upload_buffer( hwtnl->upload_ib,
index_offset,
......@@ -153,7 +153,7 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
done:
if (upload_buffer)
pipe_buffer_reference( &upload_buffer, NULL );
pipe_resource_reference( &upload_buffer, NULL );
return ret;
}
......@@ -163,7 +163,7 @@ done:
enum pipe_error
svga_hwtnl_draw_range_elements( struct svga_hwtnl *hwtnl,
struct pipe_buffer *index_buffer,
struct pipe_resource *index_buffer,
unsigned index_size,
unsigned min_index,
unsigned max_index,
......@@ -211,7 +211,7 @@ svga_hwtnl_draw_range_elements( struct svga_hwtnl *hwtnl,
gen_prim, start, count, bias );
}
else {
struct pipe_buffer *gen_buf = NULL;
struct pipe_resource *gen_buf = NULL;
/* Need to allocate a new index buffer and run the translate
* func to populate it. Could potentially cache this translated
......@@ -244,7 +244,7 @@ svga_hwtnl_draw_range_elements( struct svga_hwtnl *hwtnl,
done:
if (gen_buf)
pipe_buffer_reference( &gen_buf, NULL );
pipe_resource_reference( &gen_buf, NULL );
return ret;
}
......
......@@ -23,10 +23,11 @@
*
**********************************************************/
#include "svga_screen_texture.h"
#include "svga_resource_texture.h"
#include "svga_context.h"
#include "svga_debug.h"
#include "svga_cmd.h"
#include "svga_surface.h"
#define FILE_DEBUG_FLAG DEBUG_BLIT
......
......@@ -31,7 +31,7 @@
#include "svga_context.h"
#include "svga_state.h"
#include "svga_screen_texture.h"
#include "svga_surface.h"
static enum pipe_error
......
......@@ -42,7 +42,7 @@
static enum pipe_error
retry_draw_range_elements( struct svga_context *svga,
struct pipe_buffer *index_buffer,
struct pipe_resource *index_buffer,
unsigned index_size,
unsigned min_index,
unsigned max_index,
......@@ -150,7 +150,7 @@ retry:
static void
svga_draw_range_elements( struct pipe_context *pipe,
struct pipe_buffer *index_buffer,
struct pipe_resource *index_buffer,
unsigned index_size,
unsigned min_index,
unsigned max_index,
......@@ -224,7 +224,7 @@ svga_draw_range_elements( struct pipe_context *pipe,
static void
svga_draw_elements( struct pipe_context *pipe,
struct pipe_buffer *index_buffer,
struct pipe_resource *index_buffer,
unsigned index_size,
unsigned prim, unsigned start, unsigned count)
{
......
......@@ -25,7 +25,7 @@
#include "pipe/p_defines.h"
#include "svga_screen.h"
#include "svga_screen_texture.h"
#include "svga_surface.h"
#include "svga_context.h"
#include "svga_debug.h"
......
......@@ -28,7 +28,7 @@
#include "util/u_inlines.h"
#include "svga_context.h"
#include "svga_screen_texture.h"
#include "svga_surface.h"
static void svga_set_scissor_state( struct pipe_context *pipe,
......
......@@ -30,7 +30,7 @@
#include "svga_cmd.h"
#include "svga_context.h"
#include "svga_screen.h"
#include "svga_screen_buffer.h"
#include "svga_resource_buffer.h"
#include "svga_winsys.h"
#include "svga_debug.h"
......
......@@ -30,7 +30,7 @@
#include "tgsi/tgsi_parse.h"
#include "svga_context.h"
#include "svga_screen_texture.h"
#include "svga_resource_texture.h"
#include "svga_debug.h"
......@@ -178,7 +178,7 @@ static void svga_delete_sampler_state(struct pipe_context *pipe,
static struct pipe_sampler_view *
svga_create_sampler_view(struct pipe_context *pipe,
struct pipe_texture *texture,
struct pipe_resource *texture,
const struct pipe_sampler_view *templ)
{
struct pipe_sampler_view *view = CALLOC_STRUCT(pipe_sampler_view);
......@@ -187,7 +187,7 @@ svga_create_sampler_view(struct pipe_context *pipe,
*view = *templ;
view->reference.count = 1;
view->texture = NULL;
pipe_texture_reference(&view->texture, texture);
pipe_resource_reference(&view->texture, texture);
view->context = pipe;
}
......@@ -199,7 +199,7 @@ static void
svga_sampler_view_destroy(struct pipe_context *pipe,
struct pipe_sampler_view *view)
{
pipe_texture_reference(&view->texture, NULL);
pipe_resource_reference(&view->texture, NULL);
FREE(view);
}
......
......@@ -30,7 +30,7 @@
#include "tgsi/tgsi_parse.h"
#include "svga_screen.h"
#include "svga_screen_buffer.h"
#include "svga_resource_buffer.h"
#include "svga_context.h"
......@@ -49,13 +49,13 @@ static void svga_set_vertex_buffers(struct pipe_context *pipe,
/* Adjust refcounts */
for (i = 0; i < count; i++) {
pipe_buffer_reference(&svga->curr.vb[i].buffer, buffers[i].buffer);
pipe_resource_reference(&svga->curr.vb[i].buffer, buffers[i].buffer);
if (svga_buffer_is_user_buffer(buffers[i].buffer))
any_user_buffer = TRUE;
}
for ( ; i < svga->curr.num_vertex_buffers; i++)
pipe_buffer_reference(&svga->curr.vb[i].buffer, NULL);
pipe_resource_reference(&svga->curr.vb[i].buffer, NULL);
/* Copy remaining data */
memcpy(svga->curr.vb, buffers, count * sizeof buffers[0]);
......@@ -102,7 +102,7 @@ void svga_cleanup_vertex_state( struct svga_context *svga )
unsigned i;
for (i = 0 ; i < svga->curr.num_vertex_buffers; i++)
pipe_buffer_reference(&svga->curr.vb[i].buffer, NULL);
pipe_resource_reference(&svga->curr.vb[i].buffer, NULL);
}
......
/**********************************************************
* Copyright 2008-2009 VMware, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
**********************************************************/
#include "util/u_debug.h"
#include "svga_cmd.h"
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "util/u_inlines.h"
#include "os/os_thread.h"
#include "util/u_format.h"
#include "util/u_math.h"
#include "util/u_memory.h"
#include "svga_screen.h"
#include "svga_resource.h"
#include "svga_resource_buffer.h"
#include "svga_resource_texture.h"
#include "svga_context.h"
#include "svga_screen_texture.h"
#include "svga_screen_buffer.h"
#include "svga_winsys.h"
#include "svga_debug.h"
#include "svga_screen_buffer.h"
#include "svga_screen.h"
#include <util/u_string.h>
/* Use the pipe resource_manager module to implemen the new-style
* driver functions in terms of the old ones we have already.
*/
static struct pipe_resource *
svga_resource_create(struct pipe_screen *screen,
const struct pipe_resource *template)
{
struct svga_screen *ss = svga_screen(screen);
return rm_resource_create(ss->rm_screen,
template);
}
static struct pipe_resource *
svga_resource_from_handle(struct pipe_screen *screen,
const struct pipe_resource *template,
struct winsys_handle *handle)
const struct pipe_resource *template)
{
struct svga_screen *ss = svga_screen(screen);
return rm_resource_from_handle(ss->rm_screen,
template,
handle);
}
if (template->target == PIPE_BUFFER)
return svga_buffer_create(screen, template);
else
return svga_resource_create(screen, template);
boolean svga_resource_get_handle(struct pipe_screen *screen,
struct pipe_resource *resource,
struct winsys_handle *handle)
{
struct svga_screen *ss = svga_screen(screen);
return rm_resource_get_handle(ss->rm_screen,
resource,
handle);
}
void svga_resource_destroy(struct pipe_screen *screen,
struct pipe_resource *resource)
{
struct svga_screen *ss = svga_screen(screen);
rm_resource_destroy(ss->rm_screen,
resource);
}
struct pipe_transfer *svga_get_transfer(struct pipe_context *pipe,
struct pipe_resource *resource,
struct pipe_subresource sr,
enum pipe_transfer_usage usage,
const struct pipe_box *box)
{
struct svga_context *sc = svga_context(pipe);
return rm_get_transfer(sc->rm_context,
resource,
sr,
usage,
box);
}
void svga_transfer_destroy(struct pipe_context *pipe,
struct pipe_transfer *transfer)
{
struct svga_context *sc = svga_context(pipe);
rm_transfer_destroy(sc->rm_context,
transfer);
}
void *svga_transfer_map( struct pipe_context *pipe,
struct pipe_transfer *transfer )
{
struct svga_context *sc = svga_context(pipe);
return rm_transfer_map(sc->rm_context,
transfer);
}
void svga_transfer_flush_region( struct pipe_context *pipe,
struct pipe_transfer *transfer,
const struct pipe_box *box )
{
struct svga_context *sc = svga_context(pipe);
rm_transfer_flush_region(sc->rm_context,
transfer,
box);
}
void svga_transfer_unmap( struct pipe_context *pipe,
struct pipe_transfer *transfer )
static struct pipe_resource *
svga_resource_from_handle(struct pipe_screen * screen,
const struct pipe_resource *template,
struct winsys_handle *whandle)
{
struct svga_context *sc = svga_context(pipe);
rm_transfer_unmap(sc->rm_context,
transfer);
if (template->target == PIPE_BUFFER)
return NULL;
else
return svga_resource_from_handle(screen, template, whandle);
}
void svga_transfer_inline_write( struct pipe_context *pipe,
struct pipe_resource *resource,
struct pipe_subresource sr,
enum pipe_transfer_usage usage,
const struct pipe_box *box,
const void *data )
{
struct svga_context *sc = svga_context(pipe);
rm_transfer_inline_write(sc->rm_context,
resource,
sr,
usage,
box,
data);
}
void svga_transfer_inline_read( struct pipe_context *pipe,
struct pipe_resource *resource,
struct pipe_subresource sr,
enum pipe_transfer_usage usage,
const struct pipe_box *box,
void *data )
void
svga_init_resource_functions(struct svga_context *svga)
{
struct svga_context *sc = svga_context(pipe);
rm_transfer_inline_read(sc->rm_context,
resource,
sr,
usage,
box,
data);
svga->pipe.get_transfer = u_get_transfer_vtbl;
svga->pipe.transfer_map = u_transfer_map_vtbl;
svga->pipe.transfer_flush_region = u_transfer_flush_region_vtbl;
svga->pipe.transfer_unmap = u_transfer_unmap_vtbl;
svga->pipe.transfer_destroy = u_transfer_destroy_vtbl;
svga->pipe.transfer_inline_write = u_transfer_inline_write_vtbl;
}
void
svga_init_resource_functions(struct pipe_context *pipe)
svga_init_screen_resource_functions