struct pipe_fence_handle **fence,
unsigned flags)
{
+ if (fence)
+ *fence = NULL;
}
static void noop_destroy_context(struct pipe_context *ctx)
FREE(ctx);
}
+static boolean noop_generate_mipmap(struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ enum pipe_format format,
+ unsigned base_level,
+ unsigned last_level,
+ unsigned first_layer,
+ unsigned last_layer)
+{
+ return true;
+}
+
static struct pipe_context *noop_create_context(struct pipe_screen *screen,
void *priv, unsigned flags)
{
ctx->clear_render_target = noop_clear_render_target;
ctx->clear_depth_stencil = noop_clear_depth_stencil;
ctx->resource_copy_region = noop_resource_copy_region;
+ ctx->generate_mipmap = noop_generate_mipmap;
ctx->blit = noop_blit;
ctx->flush_resource = noop_flush_resource;
ctx->create_query = noop_create_query;
return screen->get_shader_param(screen, shader, param);
}
+static int noop_get_compute_param(struct pipe_screen *pscreen,
+ enum pipe_shader_ir ir_type,
+ enum pipe_compute_cap param,
+ void *ret)
+{
+ struct pipe_screen *screen = ((struct noop_pipe_screen*)pscreen)->oscreen;
+
+ return screen->get_compute_param(screen, ir_type, param, ret);
+}
+
static boolean noop_is_format_supported(struct pipe_screen* pscreen,
enum pipe_format format,
enum pipe_texture_target target,
FREE(screen);
}
+static void noop_fence_reference(struct pipe_screen *screen,
+ struct pipe_fence_handle **ptr,
+ struct pipe_fence_handle *fence)
+{
+}
+
+static boolean noop_fence_finish(struct pipe_screen *screen,
+ struct pipe_context *ctx,
+ struct pipe_fence_handle *fence,
+ uint64_t timeout)
+{
+ return true;
+}
+
+static void noop_query_memory_info(struct pipe_screen *pscreen,
+ struct pipe_memory_info *info)
+{
+ struct noop_pipe_screen *noop_screen = (struct noop_pipe_screen*)pscreen;
+ struct pipe_screen *screen = noop_screen->oscreen;
+
+ screen->query_memory_info(screen, info);
+}
+
struct pipe_screen *noop_screen_create(struct pipe_screen *oscreen)
{
struct noop_pipe_screen *noop_screen;
screen->get_device_vendor = noop_get_device_vendor;
screen->get_param = noop_get_param;
screen->get_shader_param = noop_get_shader_param;
+ screen->get_compute_param = noop_get_compute_param;
screen->get_paramf = noop_get_paramf;
screen->is_format_supported = noop_is_format_supported;
screen->context_create = noop_create_context;
screen->resource_destroy = noop_resource_destroy;
screen->flush_frontbuffer = noop_flush_frontbuffer;
screen->get_timestamp = noop_get_timestamp;
+ screen->fence_reference = noop_fence_reference;
+ screen->fence_finish = noop_fence_finish;
+ screen->query_memory_info = noop_query_memory_info;
return screen;
}
{
}
+static void noop_launch_grid(struct pipe_context *ctx,
+ const struct pipe_grid_info *info)
+{
+}
+
static void noop_set_blend_color(struct pipe_context *ctx,
const struct pipe_blend_color *state)
{
return MALLOC(1);
}
+static void *noop_create_compute_state(struct pipe_context *ctx,
+ const struct pipe_compute_state *state)
+{
+ return MALLOC(1);
+}
+
static struct pipe_stream_output_target *noop_create_stream_output_target(
struct pipe_context *ctx,
struct pipe_resource *res,
ctx->create_sampler_view = noop_create_sampler_view;
ctx->create_surface = noop_create_surface;
ctx->create_vertex_elements_state = noop_create_vertex_elements;
+ ctx->create_compute_state = noop_create_compute_state;
+ ctx->create_tcs_state = noop_create_shader_state;
+ ctx->create_tes_state = noop_create_shader_state;
+ ctx->create_gs_state = noop_create_shader_state;
ctx->create_vs_state = noop_create_shader_state;
ctx->bind_blend_state = noop_bind_state;
ctx->bind_depth_stencil_alpha_state = noop_bind_state;
ctx->bind_fs_state = noop_bind_state;
ctx->bind_rasterizer_state = noop_bind_state;
ctx->bind_vertex_elements_state = noop_bind_state;
+ ctx->bind_compute_state = noop_bind_state;
+ ctx->bind_tcs_state = noop_bind_state;
+ ctx->bind_tes_state = noop_bind_state;
+ ctx->bind_gs_state = noop_bind_state;
ctx->bind_vs_state = noop_bind_state;
ctx->delete_blend_state = noop_delete_state;
ctx->delete_depth_stencil_alpha_state = noop_delete_state;
ctx->delete_rasterizer_state = noop_delete_state;
ctx->delete_sampler_state = noop_delete_state;
ctx->delete_vertex_elements_state = noop_delete_state;
+ ctx->delete_compute_state = noop_delete_state;
+ ctx->delete_tcs_state = noop_delete_state;
+ ctx->delete_tes_state = noop_delete_state;
+ ctx->delete_gs_state = noop_delete_state;
ctx->delete_vs_state = noop_delete_state;
ctx->set_blend_color = noop_set_blend_color;
ctx->set_clip_state = noop_set_clip_state;
ctx->sampler_view_destroy = noop_sampler_view_destroy;
ctx->surface_destroy = noop_surface_destroy;
ctx->draw_vbo = noop_draw_vbo;
+ ctx->launch_grid = noop_launch_grid;
ctx->create_stream_output_target = noop_create_stream_output_target;
ctx->stream_output_target_destroy = noop_stream_output_target_destroy;
ctx->set_stream_output_targets = noop_set_stream_output_targets;