*/
#include "util/u_memory.h"
+#include "util/u_inlines.h"
#include "draw/draw_context.h"
#include "draw/draw_context.h"
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);
*view = *templ;
view->reference.count = 1;
view->texture = NULL;
- pipe_texture_reference(&view->texture, texture);
+ pipe_resource_reference(&view->texture, resource);
view->context = pipe;
}
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);
}
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;
*/
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;
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;