#include "util/u_memory.h"
#include "util/u_inlines.h"
-#include "util/u_format.h"
+#include "util/format/u_format.h"
#include "draw/draw_context.h"
#include "sp_tex_sample.h"
#include "sp_tex_tile_cache.h"
#include "sp_screen.h"
-#include "state_tracker/sw_winsys.h"
+#include "frontend/sw_winsys.h"
/**
*/
static void
softpipe_bind_sampler_states(struct pipe_context *pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
void **samplers)
void
softpipe_set_sampler_views(struct pipe_context *pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
if (sp_sviewsrc) {
memcpy(sp_sviewdst, sp_sviewsrc, sizeof(*sp_sviewsrc));
sp_sviewdst->compute_lambda = softpipe_get_lambda_func(&sp_sviewdst->base, shader);
+ sp_sviewdst->compute_lambda_from_grad = softpipe_get_lambda_from_grad_func(&sp_sviewdst->base, shader);
sp_sviewdst->cache = softpipe->tex_cache[shader][start + i];
}
else {
struct softpipe_context *sp,
unsigned num,
struct pipe_sampler_view **views,
- unsigned shader_type,
+ enum pipe_shader_type shader_type,
struct pipe_resource *mapped_tex[PIPE_MAX_SHADER_SAMPLER_VIEWS])
{
if (!num)
return;
- for (i = 0; i < PIPE_MAX_SHADER_SAMPLER_VIEWS; i++) {
- struct pipe_sampler_view *view = i < num ? views[i] : NULL;
+ for (i = 0; i < num; i++) {
+ struct pipe_sampler_view *view = views[i];
if (view) {
struct pipe_resource *tex = view->texture;
if (!sp_tex->dt) {
/* regular texture - setup array of mipmap level offsets */
- MAYBE_UNUSED struct pipe_resource *res = view->texture;
+ ASSERTED struct pipe_resource *res = view->texture;
int j;
if (view->target != PIPE_BUFFER) {
shader_type,
i,
width0, tex->height0, num_layers,
- first_level, last_level,
+ first_level, last_level, 0, 0,
addr,
row_stride, img_stride, mip_offsets);
}