Commit 80b39107 authored by Marek Olšák's avatar Marek Olšák Committed by Marge Bot

gallium: add missing bits of the direct multi draw interface

Acked-by: Pierre-Eric Pelloux-Prayer's avatarPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <!7441>
parent f038fb60
......@@ -232,6 +232,7 @@ The integer capabilities:
* ``PIPE_CAP_DRAW_INDIRECT``: Whether the driver supports taking draw arguments
{ count, instance_count, start, index_bias } from a PIPE_BUFFER resource.
See pipe_draw_info.
* ``PIPE_CAP_MULTI_DRAW``: Whether the driver supports direct multi draws.
* ``PIPE_CAP_MULTI_DRAW_INDIRECT``: Whether the driver supports
pipe_draw_info::indirect_stride and ::indirect_count
* ``PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS``: Whether the driver supports
......
......@@ -229,6 +229,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
case PIPE_CAP_CLEAR_SCISSORED:
case PIPE_CAP_DRAW_PARAMETERS:
case PIPE_CAP_TGSI_PACK_HALF_FLOAT:
case PIPE_CAP_MULTI_DRAW:
case PIPE_CAP_MULTI_DRAW_INDIRECT:
case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
case PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL:
......
......@@ -97,6 +97,9 @@ simplify_draw_info(struct pipe_draw_info *info)
info->min_index = 0;
info->max_index = ~0;
/* This shouldn't be set when merging single draws. */
info->increment_draw_id = false;
if (info->index_size) {
if (!info->primitive_restart)
info->restart_index = 0;
......
......@@ -145,7 +145,7 @@
* another resource's backing storage. The threaded context uses it to
* implement buffer invalidation. This call is always queued.
*
* pipe_context::multi_draw() must be implemented.
* PIPE_CAP_MULTI_DRAW must be supported.
*
*
* Performance gotchas
......
......@@ -842,6 +842,7 @@ enum pipe_cap
PIPE_CAP_CLEAR_SCISSORED,
PIPE_CAP_DRAW_PARAMETERS,
PIPE_CAP_TGSI_PACK_HALF_FLOAT,
PIPE_CAP_MULTI_DRAW,
PIPE_CAP_MULTI_DRAW_INDIRECT,
PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS,
PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL,
......
......@@ -764,7 +764,8 @@ struct pipe_draw_info
bool has_user_indices:1; /**< if true, use index.user_buffer */
bool index_bounds_valid:1; /**< whether min_index and max_index are valid;
they're always invalid if index_size == 0 */
char _pad:5; /**< padding for memcmp */
bool increment_draw_id:1; /**< whether drawid increments for direct draws */
char _pad:4; /**< padding for memcmp */
unsigned start_instance; /**< first instance id */
unsigned instance_count; /**< number of instances */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment