#include "fd6_draw.h"
#include "fd6_emit.h"
#include "fd6_gmem.h"
+#include "fd6_image.h"
#include "fd6_program.h"
#include "fd6_query.h"
#include "fd6_rasterizer.h"
if (!pctx)
return NULL;
+ /* after fd_context_init() to override set_shader_images() */
+ fd6_image_init(pctx);
+
util_blitter_set_texture_multisample(fd6_ctx->base.blitter, true);
/* fd_context_init overwrites delete_rasterizer_state, so set this
#include "pipe/p_state.h"
#include "freedreno_resource.h"
+#include "freedreno_state.h"
+
#include "fd6_image.h"
#include "fd6_format.h"
+#include "fd6_resource.h"
#include "fd6_texture.h"
struct fd6_image {
return state;
}
+
+static void fd6_set_shader_images(struct pipe_context *pctx,
+ enum pipe_shader_type shader,
+ unsigned start, unsigned count,
+ const struct pipe_image_view *images)
+{
+ struct fd_context *ctx = fd_context(pctx);
+ struct fd_shaderimg_stateobj *so = &ctx->shaderimg[shader];
+
+ fd_set_shader_images(pctx, shader, start, count, images);
+
+ if (!images)
+ return;
+
+ for (unsigned i = 0; i < count; i++) {
+ unsigned n = i + start;
+ struct pipe_image_view *buf = &so->si[n];
+
+ if (!buf->resource)
+ continue;
+
+ fd6_validate_format(ctx, fd_resource(buf->resource), buf->format);
+ }
+}
+
+void
+fd6_image_init(struct pipe_context *pctx)
+{
+ pctx->set_shader_images = fd6_set_shader_images;
+}
struct fd_ringbuffer * fd6_build_ibo_state(struct fd_context *ctx,
const struct ir3_shader_variant *v, enum pipe_shader_type shader);
+void fd6_image_init(struct pipe_context *pctx);
+
#endif /* FD6_IMAGE_H_ */
ctx->dirty_shader[shader] |= FD_DIRTY_SHADER_SSBO;
}
-static void
+void
fd_set_shader_images(struct pipe_context *pctx,
enum pipe_shader_type shader,
unsigned start, unsigned count,
return ctx->blend && ctx->blend->rt[n].blend_enable;
}
+void fd_set_shader_images(struct pipe_context *pctx,
+ enum pipe_shader_type shader,
+ unsigned start, unsigned count,
+ const struct pipe_image_view *images);
+
void fd_state_init(struct pipe_context *pctx);
#endif /* FREEDRENO_STATE_H_ */