diff options
author | Marek Olšák <[email protected]> | 2016-08-28 13:58:16 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-09-05 16:12:04 +0200 |
commit | 1c71bccdaa3ae22ebcd79c29e80f50036517aa34 (patch) | |
tree | 99d9c7cc6cf7f43e8356a56ead633c7794e252fa /src | |
parent | ed164f0d6b8baefa8813cb8fb38a6f7812b76eb8 (diff) |
noop: set missing functions
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/noop/noop_pipe.c | 51 | ||||
-rw-r--r-- | src/gallium/drivers/noop/noop_state.c | 24 |
2 files changed, 75 insertions, 0 deletions
diff --git a/src/gallium/drivers/noop/noop_pipe.c b/src/gallium/drivers/noop/noop_pipe.c index b3e2a3e4997..25e0c1ff036 100644 --- a/src/gallium/drivers/noop/noop_pipe.c +++ b/src/gallium/drivers/noop/noop_pipe.c @@ -271,6 +271,8 @@ static void noop_flush(struct pipe_context *ctx, struct pipe_fence_handle **fence, unsigned flags) { + if (fence) + *fence = NULL; } static void noop_destroy_context(struct pipe_context *ctx) @@ -278,6 +280,17 @@ 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) { @@ -293,6 +306,7 @@ static struct pipe_context *noop_create_context(struct pipe_screen *screen, 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; @@ -359,6 +373,16 @@ static int noop_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e 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, @@ -384,6 +408,29 @@ static void noop_destroy_screen(struct pipe_screen *screen) 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; @@ -406,6 +453,7 @@ struct pipe_screen *noop_screen_create(struct pipe_screen *oscreen) 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; @@ -415,6 +463,9 @@ struct pipe_screen *noop_screen_create(struct pipe_screen *oscreen) 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; } diff --git a/src/gallium/drivers/noop/noop_state.c b/src/gallium/drivers/noop/noop_state.c index 8a4938b97f5..7ae89c8e711 100644 --- a/src/gallium/drivers/noop/noop_state.c +++ b/src/gallium/drivers/noop/noop_state.c @@ -34,6 +34,11 @@ static void noop_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info { } +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) { @@ -207,6 +212,12 @@ static void *noop_create_shader_state(struct pipe_context *ctx, 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, @@ -250,6 +261,10 @@ void noop_init_state_functions(struct pipe_context *ctx) 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; @@ -257,6 +272,10 @@ void noop_init_state_functions(struct pipe_context *ctx) 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; @@ -264,6 +283,10 @@ void noop_init_state_functions(struct pipe_context *ctx) 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; @@ -280,6 +303,7 @@ void noop_init_state_functions(struct pipe_context *ctx) 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; |