Commit c5d2e90c authored by Roland Scheidegger's avatar Roland Scheidegger

gallium: more mostly merge fallout fixes...

parent fbc37226
......@@ -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 nvfx nv50
GALLIUM_DRIVERS_DIRS = softpipe trace identity i915 i965 svga r300 nvfx nv50 failover
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
GALLIUM_WINSYS_DIRS = sw sw/xlib
GALLIUM_TARGET_DIRS = libgl-xlib
......
......@@ -31,11 +31,11 @@
#include "cell/common.h"
struct cell_context;
struct pipe_texture;
struct pipe_resource;
/**
* Subclass of pipe_texture
* Subclass of pipe_resource
*/
struct cell_resource
{
......
......@@ -752,7 +752,7 @@ i915_texture_create(struct pipe_screen *screen,
* guessing that this is Xorg asking for a cursor
*/
if ((template->bind & PIPE_BIND_SCANOUT) && template->width0 != 64)
buf_usage = INTEL_NEW_SCANOUT;
buf_usage = I915_NEW_SCANOUT;
else
buf_usage = I915_NEW_TEXTURE;
......@@ -822,36 +822,3 @@ i915_texture_from_handle(struct pipe_screen * screen,
return &tex->b.b;
}
static boolean
i915_texture_get_handle(struct pipe_screen * screen,
struct pipe_texture *texture,
struct winsys_handle *whandle)
{
struct i915_screen *is = i915_screen(screen);
struct i915_texture *tex = (struct i915_texture *)texture;
struct i915_winsys *iws = is->iws;
return iws->buffer_get_handle(iws, tex->buffer, whandle, tex->stride);
}
static void
i915_texture_destroy(struct pipe_texture *pt)
{
struct i915_texture *tex = (struct i915_texture *)pt;
struct i915_winsys *iws = i915_screen(pt->screen)->iws;
uint i;
/*
DBG("%s deleting %p\n", __FUNCTION__, (void *) tex);
*/
iws->buffer_destroy(iws, tex->buffer);
for (i = 0; i < Elements(tex->image_offset); i++)
if (tex->image_offset[i])
FREE(tex->image_offset[i]);
FREE(tex);
}
......@@ -31,7 +31,7 @@
struct i915_winsys;
struct i915_winsys_buffer;
struct i915_winsys_batchbuffer;
struct pipe_texture;
struct pipe_resource;
struct pipe_fence_handle;
struct winsys_handle;
......
......@@ -492,7 +492,7 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup,
/* We're referencing the texture's internal data, so save a
* reference to it.
*/
pipe_texture_reference(&setup->fs.current_tex[i], tex);
pipe_resource_reference(&setup->fs.current_tex[i], tex);
if (!lp_tex->dt) {
/* regular texture - setup array of mipmap level pointers */
......
......@@ -52,9 +52,8 @@ struct lp_shader_input {
unsigned src_index; /* where to find values in incoming vertices */
};
struct pipe_texture;
struct pipe_resource;
struct pipe_surface;
struct pipe_buffer;
struct pipe_blend_color;
struct pipe_screen;
struct pipe_framebuffer_state;
......
......@@ -111,7 +111,7 @@ struct lp_setup_context
const struct lp_rast_state *stored; /**< what's in the scene */
struct lp_rast_state current; /**< currently set state */
struct pipe_texture *current_tex[PIPE_MAX_SAMPLERS];
struct pipe_resource *current_tex[PIPE_MAX_SAMPLERS];
} fs;
/** fragment shader constants */
......
......@@ -49,7 +49,7 @@ struct svga_winsys_buffer;
struct pipe_screen;
struct pipe_context;
struct pipe_fence_handle;
struct pipe_texture;
struct pipe_resource;
struct svga_region;
struct winsys_handle;
......
......@@ -54,7 +54,7 @@ void trace_dump_template(const struct pipe_resource *templat)
return;
}
trace_dump_struct_begin("pipe_texture");
trace_dump_struct_begin("pipe_resource");
trace_dump_member(int, templat, target);
trace_dump_member(format, templat, format);
......
......@@ -47,7 +47,7 @@ void
dri1_swap_fences_clear(struct dri_drawable *drawable);
struct pipe_surface *
dri1_get_pipe_surface(struct dri_drawable *drawable, struct pipe_texture *ptex);
dri1_get_pipe_surface(struct dri_drawable *drawable, struct pipe_resource *ptex);
void
dri1_destroy_pipe_surface(struct dri_drawable *drawable);
......
......@@ -46,7 +46,7 @@ static boolean
dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
const enum st_attachment_type *statts,
unsigned count,
struct pipe_texture **out)
struct pipe_resource **out)
{
struct dri_drawable *drawable =
(struct dri_drawable *) stfbi->st_manager_private;
......@@ -99,7 +99,7 @@ dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
for (i = 0; i < count; i++) {
out[i] = NULL;
pipe_texture_reference(&out[i], drawable->textures[statts[i]]);
pipe_resource_reference(&out[i], drawable->textures[statts[i]]);
}
return TRUE;
......@@ -156,7 +156,7 @@ dri_destroy_st_framebuffer(struct st_framebuffer_iface *stfbi)
int i;
for (i = 0; i < ST_ATTACHMENT_COUNT; i++)
pipe_texture_reference(&drawable->textures[i], NULL);
pipe_resource_reference(&drawable->textures[i], NULL);
FREE(stfbi);
}
......
......@@ -89,7 +89,7 @@ drisw_put_image(struct dri_drawable *drawable,
static INLINE void
drisw_present_texture(__DRIdrawable *dPriv,
struct pipe_texture *ptex)
struct pipe_resource *ptex)
{
struct dri_drawable *drawable = dri_drawable(dPriv);
struct dri_screen *screen = dri_screen(drawable->sPriv);
......@@ -117,7 +117,7 @@ drisw_invalidate_drawable(__DRIdrawable *dPriv)
static INLINE void
drisw_copy_to_front(__DRIdrawable * dPriv,
struct pipe_texture *ptex)
struct pipe_resource *ptex)
{
drisw_present_texture(dPriv, ptex);
......@@ -133,7 +133,7 @@ drisw_swap_buffers(__DRIdrawable *dPriv)
{
struct dri_context *ctx = dri_get_current();
struct dri_drawable *drawable = dri_drawable(dPriv);
struct pipe_texture *ptex;
struct pipe_resource *ptex;
if (!ctx)
return;
......@@ -152,7 +152,7 @@ drisw_flush_frontbuffer(struct dri_drawable *drawable,
enum st_attachment_type statt)
{
struct dri_context *ctx = dri_get_current();
struct pipe_texture *ptex;
struct pipe_resource *ptex;
if (!ctx)
return;
......@@ -180,7 +180,7 @@ drisw_allocate_textures(struct dri_drawable *drawable,
unsigned mask)
{
struct dri_screen *screen = dri_screen(drawable->sPriv);
struct pipe_texture templ;
struct pipe_resource templ;
unsigned width, height;
boolean resized;
int i;
......@@ -194,7 +194,7 @@ drisw_allocate_textures(struct dri_drawable *drawable,
/* remove outdated textures */
if (resized) {
for (i = 0; i < ST_ATTACHMENT_COUNT; i++)
pipe_texture_reference(&drawable->textures[i], NULL);
pipe_resource_reference(&drawable->textures[i], NULL);
}
memset(&templ, 0, sizeof(templ));
......@@ -219,12 +219,12 @@ drisw_allocate_textures(struct dri_drawable *drawable,
case ST_ATTACHMENT_FRONT_RIGHT:
case ST_ATTACHMENT_BACK_RIGHT:
format = drawable->stvis.color_format;
tex_usage = PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
PIPE_TEXTURE_USAGE_RENDER_TARGET;
tex_usage = PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_RENDER_TARGET;
break;
case ST_ATTACHMENT_DEPTH_STENCIL:
format = drawable->stvis.depth_stencil_format;
tex_usage = PIPE_TEXTURE_USAGE_DEPTH_STENCIL;
tex_usage = PIPE_BIND_DEPTH_STENCIL;
break;
default:
format = PIPE_FORMAT_NONE;
......@@ -233,10 +233,10 @@ drisw_allocate_textures(struct dri_drawable *drawable,
if (format != PIPE_FORMAT_NONE) {
templ.format = format;
templ.tex_usage = tex_usage;
templ.bind = tex_usage;
drawable->textures[i] =
screen->pipe_screen->texture_create(screen->pipe_screen, &templ);
screen->pipe_screen->resource_create(screen->pipe_screen, &templ);
}
}
......
......@@ -148,7 +148,7 @@ dri_sw_displaytarget_unmap(struct sw_winsys *ws,
static struct sw_displaytarget *
dri_sw_displaytarget_from_handle(struct sw_winsys *winsys,
const struct pipe_texture *templ,
const struct pipe_resource *templ,
struct winsys_handle *whandle,
unsigned *stride)
{
......
......@@ -292,7 +292,7 @@ void st_init_extensions(struct st_context *st)
else if (screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
PIPE_TEXTURE_2D,
PIPE_BIND_DEPTH_STENCIL, 0) &&
screen->is_format_supported(screen, PIPE_FORMAT_Z24S8_UNORM,
screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
PIPE_TEXTURE_2D,
PIPE_BIND_SAMPLER_VIEW, 0)) {
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
......
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