mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 01:28:07 +02:00
llvmpipe: add support for ARB_indirect_parameters.
This just adds support for getting the draw count from the indirect buffer. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234>
This commit is contained in:
parent
315fa2e5c9
commit
ee9879335e
4 changed files with 23 additions and 20 deletions
|
|
@ -498,9 +498,6 @@ spec/arb_get_program_binary/xfb-varyings: skip
|
|||
spec/arb_gpu_shader_fp64/execution/arb_gpu_shader_fp64-dlist-uniforms: skip
|
||||
spec/arb_gpu_shader_fp64/execution/arb_gpu_shader_fp64-fs-non-uniform-control-flow-ssbo: skip
|
||||
spec/arb_gpu_shader_fp64/execution/arb_gpu_shader_fp64-vs-non-uniform-control-flow-ssbo: skip
|
||||
spec/arb_indirect_parameters/conditional-render: skip
|
||||
spec/arb_indirect_parameters/tf-count-arrays: skip
|
||||
spec/arb_indirect_parameters/tf-count-elements: skip
|
||||
spec/arb_internalformat_query/minmax: skip
|
||||
spec/arb_internalformat_query/misc. api error checks: skip
|
||||
spec/arb_pipeline_statistics_query/arb_pipeline_statistics_query-frag: fail
|
||||
|
|
@ -539,17 +536,6 @@ spec/arb_query_buffer_object/coherency/indirect-dispatch-gl_tess_evaluation_shad
|
|||
spec/arb_query_buffer_object/coherency/indirect-dispatch-gl_transform_feedback_primitives_written: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-dispatch-gl_vertex_shader_invocations: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-dispatch-gl_vertices_submitted: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_any_samples_passed: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_any_samples_passed_conservative: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_clipping_input_primitives: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_clipping_output_primitives: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_compute_shader_invocations: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_fragment_shader_invocations: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_geometry_shader_invocations: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_geometry_shader_primitives_emitted: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_primitives_generated: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_primitives_submitted: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_samples_passed: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_tess_control_shader_patches: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_tess_evaluation_shader_invocations: skip
|
||||
spec/arb_query_buffer_object/coherency/indirect-draw-count-gl_time_elapsed: skip
|
||||
|
|
@ -2221,10 +2207,10 @@ wgl/wgl-sanity: skip
|
|||
summary:
|
||||
name: results
|
||||
---- --------
|
||||
pass: 19302
|
||||
pass: 19319
|
||||
fail: 236
|
||||
crash: 2
|
||||
skip: 1962
|
||||
skip: 1948
|
||||
timeout: 0
|
||||
warn: 2
|
||||
incomplete: 0
|
||||
|
|
@ -2233,4 +2219,4 @@ summary:
|
|||
changes: 0
|
||||
fixes: 0
|
||||
regressions: 0
|
||||
total: 21522
|
||||
total: 21525
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ GL 4.5, GLSL 4.50 -- all DONE: nvc0, radeonsi, r600
|
|||
GL 4.6, GLSL 4.60 -- all DONE: radeonsi
|
||||
|
||||
GL_ARB_gl_spirv DONE (i965/gen7+)
|
||||
GL_ARB_indirect_parameters DONE (i965/gen7+, nvc0, virgl)
|
||||
GL_ARB_indirect_parameters DONE (i965/gen7+, nvc0, llvmpipe, virgl)
|
||||
GL_ARB_pipeline_statistics_query DONE (i965, nvc0, r600, llvmpipe, softpipe, swr)
|
||||
GL_ARB_polygon_offset_clamp DONE (freedreno, i965, nv50, nvc0, r600, llvmpipe, swr, virgl)
|
||||
GL_ARB_shader_atomic_counter_ops DONE (freedreno/a5xx+, i965/gen7+, nvc0, r600, llvmpipe, softpipe, virgl)
|
||||
|
|
|
|||
|
|
@ -143,6 +143,23 @@ util_draw_indirect(struct pipe_context *pipe,
|
|||
|
||||
memcpy(&info, info_in, sizeof(info));
|
||||
|
||||
uint32_t draw_count = info_in->indirect->draw_count;
|
||||
|
||||
if (info_in->indirect->indirect_draw_count) {
|
||||
struct pipe_transfer *dc_transfer;
|
||||
uint32_t *dc_param = pipe_buffer_map_range(pipe,
|
||||
info_in->indirect->indirect_draw_count,
|
||||
info_in->indirect->indirect_draw_count_offset,
|
||||
4, PIPE_TRANSFER_READ, &dc_transfer);
|
||||
if (!dc_transfer) {
|
||||
debug_printf("%s: failed to map indirect draw count buffer\n", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
if (dc_param[0] < draw_count)
|
||||
draw_count = dc_param[0];
|
||||
pipe_buffer_unmap(pipe, dc_transfer);
|
||||
}
|
||||
|
||||
params = (uint32_t *)
|
||||
pipe_buffer_map_range(pipe,
|
||||
info_in->indirect->buffer,
|
||||
|
|
@ -155,7 +172,7 @@ util_draw_indirect(struct pipe_context *pipe,
|
|||
return;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < info_in->indirect->draw_count; i++) {
|
||||
for (unsigned i = 0; i < draw_count; i++) {
|
||||
info.count = params[0];
|
||||
info.instance_count = params[1];
|
||||
info.start = params[2];
|
||||
|
|
|
|||
|
|
@ -328,6 +328,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||
case PIPE_CAP_DRAW_PARAMETERS:
|
||||
return 1;
|
||||
case PIPE_CAP_MULTI_DRAW_INDIRECT:
|
||||
case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
|
||||
return 1;
|
||||
case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
|
||||
case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
|
||||
|
|
@ -338,7 +339,6 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||
case PIPE_CAP_SHAREABLE_SHADERS:
|
||||
case PIPE_CAP_TGSI_PACK_HALF_FLOAT:
|
||||
case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
|
||||
case PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL:
|
||||
case PIPE_CAP_INVALIDATE_BUFFER:
|
||||
case PIPE_CAP_GENERATE_MIPMAP:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue