X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fsoftpipe%2Fsp_state_sampler.c;h=2692f06c927bf2fc52ebe36b2d874260e034f841;hb=1318848f782cce716d6376ca13aebf68b728e24c;hp=d501952bba9e5846830cd723952ea82e74fd65c9;hpb=880e3fb09b538f6f0b6fad2db7e0e10e9df43555;p=mesa.git diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c index d501952bba9..2692f06c927 100644 --- a/src/gallium/drivers/softpipe/sp_state_sampler.c +++ b/src/gallium/drivers/softpipe/sp_state_sampler.c @@ -30,6 +30,7 @@ */ #include "util/u_memory.h" +#include "util/u_inlines.h" #include "draw/draw_context.h" #include "draw/draw_context.h" @@ -123,7 +124,7 @@ softpipe_bind_vertex_sampler_states(struct pipe_context *pipe, struct pipe_sampler_view * softpipe_create_sampler_view(struct pipe_context *pipe, - struct pipe_texture *texture, + struct pipe_resource *resource, const struct pipe_sampler_view *templ) { struct pipe_sampler_view *view = CALLOC_STRUCT(pipe_sampler_view); @@ -132,7 +133,7 @@ softpipe_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, resource); view->context = pipe; } @@ -144,7 +145,7 @@ void softpipe_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); } @@ -223,10 +224,10 @@ softpipe_set_vertex_sampler_views(struct pipe_context *pipe, static struct sp_sampler_varient * get_sampler_varient( unsigned unit, struct sp_sampler *sampler, - struct pipe_texture *texture, + struct pipe_resource *resource, unsigned processor ) { - struct softpipe_texture *sp_texture = softpipe_texture(texture); + struct softpipe_resource *sp_texture = softpipe_resource(resource); struct sp_sampler_varient *v = NULL; union sp_sampler_key key; @@ -274,7 +275,7 @@ softpipe_reset_sampler_varients(struct softpipe_context *softpipe) */ for (i = 0; i <= softpipe->vs->max_sampler; i++) { if (softpipe->vertex_samplers[i]) { - struct pipe_texture *texture = NULL; + struct pipe_resource *texture = NULL; if (softpipe->vertex_sampler_views[i]) { texture = softpipe->vertex_sampler_views[i]->texture; @@ -294,7 +295,7 @@ softpipe_reset_sampler_varients(struct softpipe_context *softpipe) for (i = 0; i <= softpipe->fs->info.file_max[TGSI_FILE_SAMPLER]; i++) { if (softpipe->sampler[i]) { - struct pipe_texture *texture = NULL; + struct pipe_resource *texture = NULL; if (softpipe->sampler_views[i]) { texture = softpipe->sampler_views[i]->texture;