gallium: add PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE and corresponding cap
v2: rename cap to PIPE_CAP_QUERY_SO_OVERFLOW and be a bit more explicit in the documentation Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
f444ac5e60
commit
a677799e51
|
@ -372,6 +372,7 @@ util_dump_query_type_names[] = {
|
|||
"PIPE_QUERY_PRIMITIVES_EMITTED",
|
||||
"PIPE_QUERY_SO_STATISTICS",
|
||||
"PIPE_QUERY_SO_OVERFLOW_PREDICATE",
|
||||
"PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE",
|
||||
"PIPE_QUERY_GPU_FINISHED",
|
||||
"PIPE_QUERY_PIPELINE_STATISTICS",
|
||||
};
|
||||
|
|
|
@ -537,6 +537,7 @@ util_query_clear_result(union pipe_query_result *result, unsigned type)
|
|||
switch (type) {
|
||||
case PIPE_QUERY_OCCLUSION_PREDICATE:
|
||||
case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
|
||||
case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
|
||||
case PIPE_QUERY_GPU_FINISHED:
|
||||
result->b = FALSE;
|
||||
break;
|
||||
|
|
|
@ -428,9 +428,17 @@ XXX the 2nd value is equivalent to ``PIPE_QUERY_PRIMITIVES_GENERATED`` but it is
|
|||
unclear if it should be increased if stream output is not active.
|
||||
|
||||
``PIPE_QUERY_SO_OVERFLOW_PREDICATE`` returns a boolean value indicating
|
||||
whether the stream output targets have overflowed as a result of the
|
||||
whether a selected stream output target has overflowed as a result of the
|
||||
commands issued between ``begin_query`` and ``end_query``.
|
||||
This query can be used with ``render_condition``.
|
||||
This query can be used with ``render_condition``. The output stream is
|
||||
selected by the stream number passed to ``create_query``.
|
||||
|
||||
``PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE`` returns a boolean value indicating
|
||||
whether any stream output target has overflowed as a result of the commands
|
||||
issued between ``begin_query`` and ``end_query``. This query can be used
|
||||
with ``render_condition``, and its result is the logical OR of multiple
|
||||
``PIPE_QUERY_SO_OVERFLOW_PREDICATE`` queries, one for each stream output
|
||||
target.
|
||||
|
||||
``PIPE_QUERY_GPU_FINISHED`` returns a boolean value indicating whether
|
||||
all commands issued before ``end_query`` have completed. However, this
|
||||
|
|
|
@ -398,6 +398,11 @@ The integer capabilities:
|
|||
supported.
|
||||
* ``PIPE_CAP_NIR_SAMPLERS_AS_DEREF``: Whether NIR tex instructions should
|
||||
reference texture and sampler as NIR derefs instead of by indices.
|
||||
* ``PIPE_CAP_QUERY_SO_OVERFLOW``: Whether the
|
||||
``PIPE_QUERY_SO_OVERFLOW_PREDICATE`` and
|
||||
``PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE`` query types are supported. Note that
|
||||
for a driver that does not support multiple output streams (i.e.,
|
||||
``PIPE_CAP_MAX_VERTEX_STREAMS`` is 1), both query types are identical.
|
||||
|
||||
|
||||
.. _pipe_capf:
|
||||
|
|
|
@ -261,6 +261,7 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
|
||||
/* Stream output. */
|
||||
|
|
|
@ -322,6 +322,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
|
||||
case PIPE_CAP_MAX_VIEWPORTS:
|
||||
|
|
|
@ -311,6 +311,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
|
|||
case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
|
||||
case PIPE_CAP_MAX_VIEWPORTS:
|
||||
|
|
|
@ -357,6 +357,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
}
|
||||
/* should only get here on unhandled cases */
|
||||
|
|
|
@ -221,6 +221,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
|
||||
case PIPE_CAP_VENDOR_ID:
|
||||
|
|
|
@ -273,6 +273,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
|
||||
case PIPE_CAP_VENDOR_ID:
|
||||
|
|
|
@ -302,6 +302,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
|
||||
case PIPE_CAP_VENDOR_ID:
|
||||
|
|
|
@ -243,6 +243,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
|
||||
/* SWTCL-only features. */
|
||||
|
|
|
@ -399,6 +399,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
|
||||
case PIPE_CAP_DOUBLES:
|
||||
|
|
|
@ -603,6 +603,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_UMA:
|
||||
case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
|
||||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
|
||||
case PIPE_CAP_QUERY_BUFFER_OBJECT:
|
||||
|
|
|
@ -307,6 +307,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
|
||||
return 4;
|
||||
|
|
|
@ -451,6 +451,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -340,6 +340,7 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
|
||||
case PIPE_CAP_VENDOR_ID:
|
||||
|
|
|
@ -879,6 +879,7 @@ trace_dump_query_result(unsigned query_type,
|
|||
switch (query_type) {
|
||||
case PIPE_QUERY_OCCLUSION_PREDICATE:
|
||||
case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
|
||||
case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
|
||||
case PIPE_QUERY_GPU_FINISHED:
|
||||
trace_dump_bool(result->b);
|
||||
break;
|
||||
|
|
|
@ -262,6 +262,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
|
||||
/* Stream output. */
|
||||
|
|
|
@ -266,6 +266,7 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||
case PIPE_CAP_POST_DEPTH_COVERAGE:
|
||||
case PIPE_CAP_BINDLESS_TEXTURE:
|
||||
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
|
||||
case PIPE_CAP_QUERY_SO_OVERFLOW:
|
||||
return 0;
|
||||
case PIPE_CAP_VENDOR_ID:
|
||||
return 0x1af4;
|
||||
|
|
|
@ -546,6 +546,7 @@ enum pipe_query_type {
|
|||
PIPE_QUERY_PRIMITIVES_EMITTED,
|
||||
PIPE_QUERY_SO_STATISTICS,
|
||||
PIPE_QUERY_SO_OVERFLOW_PREDICATE,
|
||||
PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE,
|
||||
PIPE_QUERY_GPU_FINISHED,
|
||||
PIPE_QUERY_PIPELINE_STATISTICS,
|
||||
PIPE_QUERY_TYPES,
|
||||
|
@ -781,6 +782,7 @@ enum pipe_cap
|
|||
PIPE_CAP_POST_DEPTH_COVERAGE,
|
||||
PIPE_CAP_BINDLESS_TEXTURE,
|
||||
PIPE_CAP_NIR_SAMPLERS_AS_DEREF,
|
||||
PIPE_CAP_QUERY_SO_OVERFLOW,
|
||||
};
|
||||
|
||||
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
|
||||
|
@ -952,6 +954,7 @@ union pipe_query_result
|
|||
{
|
||||
/* PIPE_QUERY_OCCLUSION_PREDICATE */
|
||||
/* PIPE_QUERY_SO_OVERFLOW_PREDICATE */
|
||||
/* PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE */
|
||||
/* PIPE_QUERY_GPU_FINISHED */
|
||||
boolean b;
|
||||
|
||||
|
|
Loading…
Reference in New Issue