ctx->rasterizer = hwcso;
}
+static void
+panfrost_set_shader_images(
+ struct pipe_context *pctx,
+ enum pipe_shader_type shader,
+ unsigned start_slot, unsigned count,
+ const struct pipe_image_view *iviews)
+{
+ struct panfrost_context *ctx = pan_context(pctx);
+
+ /* Unbind start_slot...start_slot+count */
+ if (!iviews) {
+ for (int i = start_slot; i < start_slot + count; i++) {
+ pipe_resource_reference(&ctx->images[shader][i].resource, NULL);
+ }
+
+ ctx->image_mask[shader] &= ~(((1ull << count) - 1) << start_slot);
+ return;
+ }
+
+ /* Bind start_slot...start_slot+count */
+ for (int i = 0; i < count; i++) {
+ const struct pipe_image_view *image = &iviews[i];
+ SET_BIT(ctx->image_mask[shader], 1 << (start_slot + i), image->resource);
+
+ if (!image->resource) {
+ util_copy_image_view(&ctx->images[shader][start_slot+i], NULL);
+ continue;
+ }
+
+ struct panfrost_resource *rsrc = pan_resource(image->resource);
+
+ /* Images don't work with AFBC, since they require pixel-level granularity */
+ if (drm_is_afbc(rsrc->layout.modifier)) {
+ pan_resource_modifier_convert(ctx, rsrc,
+ DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED);
+ }
+
+ util_copy_image_view(&ctx->images[shader][start_slot+i], image);
+ }
+}
+
static void *
panfrost_create_vertex_elements_state(
struct pipe_context *pctx,
}
static void
-panfrost_set_shader_images(
- struct pipe_context *pctx,
- enum pipe_shader_type shader,
- unsigned start, unsigned count,
- const struct pipe_image_view *images)
-{
- /* TODO */
-}
-
-static void
panfrost_set_framebuffer_state(struct pipe_context *pctx,
const struct pipe_framebuffer_state *fb)
{