Commit 18ba7401 authored by Keith Whitwell's avatar Keith Whitwell

r300: fix compilation after merge

Also build r300 by default.
parent eb9c0175
......@@ -98,7 +98,7 @@ EGL_DRIVERS_DIRS = glx
# Gallium directories and
GALLIUM_DIRS = auxiliary drivers state_trackers
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
GALLIUM_DRIVERS_DIRS = softpipe trace identity i915 i965 svga # r300
GALLIUM_DRIVERS_DIRS = softpipe trace identity i915 i965 svga r300
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
GALLIUM_WINSYS_DIRS = null xlib drm
GALLIUM_TARGET_DIRS = libgl-xlib
......
......@@ -394,24 +394,28 @@ static void r300_align_ushort_elts(struct r300_context *r300,
struct pipe_resource **elts,
unsigned start, unsigned count)
{
struct pipe_screen* screen = r300->context.screen;
struct pipe_context* context = &r300->context;
struct pipe_transfer *in_transfer = NULL;
struct pipe_transfer *out_transfer = NULL;
struct pipe_resource* new_elts;
unsigned short *in_map;
unsigned short *out_map;
new_elts = pipe_buffer_create(screen, 32,
new_elts = pipe_buffer_create(context->screen, 32,
PIPE_BUFFER_USAGE_INDEX |
PIPE_BUFFER_USAGE_CPU_WRITE |
PIPE_BUFFER_USAGE_GPU_READ,
2 * count);
in_map = pipe_buffer_map(screen, *elts, PIPE_BUFFER_USAGE_CPU_READ);
out_map = pipe_buffer_map(screen, new_elts, PIPE_BUFFER_USAGE_CPU_WRITE);
in_map = pipe_buffer_map(context, *elts,
PIPE_BUFFER_USAGE_CPU_READ, &in_transfer);
out_map = pipe_buffer_map(context, new_elts,
PIPE_BUFFER_USAGE_CPU_WRITE, &out_transfer);
memcpy(out_map, in_map+start, 2 * count);
pipe_buffer_unmap(screen, *elts);
pipe_buffer_unmap(screen, new_elts);
pipe_buffer_unmap(context, *elts, in_transfer);
pipe_buffer_unmap(context, new_elts, out_transfer);
*elts = new_elts;
}
......
......@@ -1151,7 +1151,7 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe,
if (vbo->max_index == ~0) {
/* Bogus value from broken state tracker; hax it. */
vbo->max_index =
(vbo->buffer->size - vbo->buffer_offset) / vbo->stride;
(vbo->buffer->width0 - vbo->buffer_offset) / vbo->stride;
}
max_index = MIN2(vbo->max_index, max_index);
......
......@@ -352,7 +352,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
tex = (struct r300_texture *)view->texture;
sampler = state->sampler_states[i];
assert(view->format == tex->tex.format);
assert(view->format == tex->b.b.format);
texstate = &state->regs[i];
memcpy(texstate->format, &tex->state, sizeof(uint32_t)*3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment