X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fi915%2Fi915_state.c;h=c90fcfd74919e08e11fb72d2bd64078b8b0b6fd2;hb=b419ca937a666b0e5a6aca4cf179d8d43e0a3996;hp=b2f52d5d689ddf0dd116b794e39a66d1f27ba964;hpb=877128505431adaf817dc8069172ebe4a1cdf5d8;p=mesa.git diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index b2f52d5d689..c90fcfd7491 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -42,6 +42,7 @@ #include "i915_state_inlines.h" #include "i915_fpc.h" #include "i915_resource.h" +#include "i915_state.h" /* The i915 (and related graphics cores) do not support GL_CLAMP. The * Intel drivers for "other operating systems" implement GL_CLAMP as @@ -812,6 +813,26 @@ i915_set_sampler_views(struct pipe_context *pipe, unsigned shader, } +struct pipe_sampler_view * +i915_create_sampler_view_custom(struct pipe_context *pipe, + struct pipe_resource *texture, + const struct pipe_sampler_view *templ, + unsigned width0, + unsigned height0) +{ + struct pipe_sampler_view *view = CALLOC_STRUCT(pipe_sampler_view); + + if (view) { + *view = *templ; + view->reference.count = 1; + view->texture = NULL; + pipe_resource_reference(&view->texture, texture); + view->context = pipe; + } + + return view; +} + static struct pipe_sampler_view * i915_create_sampler_view(struct pipe_context *pipe, struct pipe_resource *texture,