gallium: change comments to remove 'state tracker'
Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
This commit is contained in:
parent
d6287a94b6
commit
8c9b9aac7d
|
@ -430,7 +430,7 @@ Mesa EGL supports different sets of environment variables. See the
|
||||||
options.</dd>
|
options.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h3>Clover state tracker environment variables</h3>
|
<h3>Clover environment variables</h3>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>CLOVER_EXTRA_BUILD_OPTIONS</code></dt>
|
<dt><code>CLOVER_EXTRA_BUILD_OPTIONS</code></dt>
|
||||||
|
@ -507,7 +507,7 @@ Mesa EGL supports different sets of environment variables. See the
|
||||||
<code>wglSwapIntervalEXT()</code> will have no effect.</dd>
|
<code>wglSwapIntervalEXT()</code> will have no effect.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h3>VA-API state tracker environment variables</h3>
|
<h3>VA-API environment variables</h3>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>VAAPI_MPEG4_ENABLED</code></dt>
|
<dt><code>VAAPI_MPEG4_ENABLED</code></dt>
|
||||||
<dd>enable MPEG4 for VA-API, disabled by default.</dd>
|
<dd>enable MPEG4 for VA-API, disabled by default.</dd>
|
||||||
|
|
|
@ -76,7 +76,7 @@ option(
|
||||||
type : 'combo',
|
type : 'combo',
|
||||||
value : 'auto',
|
value : 'auto',
|
||||||
choices : ['auto', 'true', 'false'],
|
choices : ['auto', 'true', 'false'],
|
||||||
description : 'enable gallium vdpau state tracker.',
|
description : 'enable gallium vdpau frontend.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'vdpau-libs-path',
|
'vdpau-libs-path',
|
||||||
|
@ -89,7 +89,7 @@ option(
|
||||||
type : 'combo',
|
type : 'combo',
|
||||||
value : 'auto',
|
value : 'auto',
|
||||||
choices : ['auto', 'true', 'false'],
|
choices : ['auto', 'true', 'false'],
|
||||||
description : 'enable gallium xvmc state tracker.',
|
description : 'enable gallium xvmc frontend.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'xvmc-libs-path',
|
'xvmc-libs-path',
|
||||||
|
@ -102,7 +102,7 @@ option(
|
||||||
type : 'combo',
|
type : 'combo',
|
||||||
value : 'auto',
|
value : 'auto',
|
||||||
choices : ['auto', 'disabled', 'bellagio', 'tizonia'],
|
choices : ['auto', 'disabled', 'bellagio', 'tizonia'],
|
||||||
description : 'enable gallium omx state tracker.',
|
description : 'enable gallium omx frontend.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'omx-libs-path',
|
'omx-libs-path',
|
||||||
|
@ -115,7 +115,7 @@ option(
|
||||||
type : 'combo',
|
type : 'combo',
|
||||||
value : 'auto',
|
value : 'auto',
|
||||||
choices : ['auto', 'true', 'false'],
|
choices : ['auto', 'true', 'false'],
|
||||||
description : 'enable gallium va state tracker.',
|
description : 'enable gallium va frontend.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'va-libs-path',
|
'va-libs-path',
|
||||||
|
@ -128,26 +128,26 @@ option(
|
||||||
type : 'combo',
|
type : 'combo',
|
||||||
value : 'auto',
|
value : 'auto',
|
||||||
choices : ['auto', 'true', 'false'],
|
choices : ['auto', 'true', 'false'],
|
||||||
description : 'enable gallium xa state tracker.',
|
description : 'enable gallium xa frontend.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'gallium-nine',
|
'gallium-nine',
|
||||||
type : 'boolean',
|
type : 'boolean',
|
||||||
value : false,
|
value : false,
|
||||||
description : 'build gallium "nine" Direct3D 9.x state tracker.',
|
description : 'build gallium "nine" Direct3D 9.x frontend.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'gallium-opencl',
|
'gallium-opencl',
|
||||||
type : 'combo',
|
type : 'combo',
|
||||||
choices : ['icd', 'standalone', 'disabled'],
|
choices : ['icd', 'standalone', 'disabled'],
|
||||||
value : 'disabled',
|
value : 'disabled',
|
||||||
description : 'build gallium "clover" OpenCL state tracker.',
|
description : 'build gallium "clover" OpenCL frontend.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'opencl-spirv',
|
'opencl-spirv',
|
||||||
type : 'boolean',
|
type : 'boolean',
|
||||||
value : false,
|
value : false,
|
||||||
description : 'build gallium "clover" OpenCL state tracker with SPIR-V binary support.',
|
description : 'build gallium "clover" OpenCL frontend with SPIR-V binary support.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'd3d-drivers-path',
|
'd3d-drivers-path',
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
= General Considerations =
|
= General Considerations =
|
||||||
|
|
||||||
The state tracker and winsys driver support a rather limited number of
|
The frontend and winsys driver support a rather limited number of
|
||||||
platforms. However, the pipe drivers are meant to run in a wide number of
|
platforms. However, the pipe drivers are meant to run in a wide number of
|
||||||
platforms. Hence the pipe drivers, the auxiliary modules, and all public
|
platforms. Hence the pipe drivers, the auxiliary modules, and all public
|
||||||
headers in general, should strictly follow these guidelines to ensure
|
headers in general, should strictly follow these guidelines to ensure
|
||||||
|
|
|
@ -39,7 +39,7 @@ if env['platform'] == 'windows':
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# State trackers and targets
|
# Frontends and targets
|
||||||
#
|
#
|
||||||
|
|
||||||
if not env['embedded']:
|
if not env['embedded']:
|
||||||
|
|
|
@ -71,7 +71,7 @@ cso_set_samplers(struct cso_context *cso,
|
||||||
const struct pipe_sampler_state **states);
|
const struct pipe_sampler_state **states);
|
||||||
|
|
||||||
|
|
||||||
/* Alternate interface to support state trackers that like to modify
|
/* Alternate interface to support gallium frontends that like to modify
|
||||||
* samplers one at a time:
|
* samplers one at a time:
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
@ -100,7 +100,7 @@ void cso_set_stream_outputs(struct cso_context *ctx,
|
||||||
* We don't provide shader caching in CSO. Most of the time the api provides
|
* We don't provide shader caching in CSO. Most of the time the api provides
|
||||||
* object semantics for shaders anyway, and the cases where it doesn't
|
* object semantics for shaders anyway, and the cases where it doesn't
|
||||||
* (eg mesa's internally-generated texenv programs), it will be up to
|
* (eg mesa's internally-generated texenv programs), it will be up to
|
||||||
* the state tracker to implement their own specialized caching.
|
* gallium frontends to implement their own specialized caching.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void cso_set_fragment_shader_handle(struct cso_context *ctx, void *handle);
|
void cso_set_fragment_shader_handle(struct cso_context *ctx, void *handle);
|
||||||
|
|
|
@ -633,7 +633,7 @@ aaline_stage_from_pipe(struct pipe_context *pipe)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function overrides the driver's create_fs_state() function and
|
* This function overrides the driver's create_fs_state() function and
|
||||||
* will typically be called by the state tracker.
|
* will typically be called by the gallium frontend.
|
||||||
*/
|
*/
|
||||||
static void *
|
static void *
|
||||||
aaline_create_fs_state(struct pipe_context *pipe,
|
aaline_create_fs_state(struct pipe_context *pipe,
|
||||||
|
|
|
@ -734,7 +734,7 @@ aapoint_stage_from_pipe(struct pipe_context *pipe)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function overrides the driver's create_fs_state() function and
|
* This function overrides the driver's create_fs_state() function and
|
||||||
* will typically be called by the state tracker.
|
* will typically be called by the gallium frontend.
|
||||||
*/
|
*/
|
||||||
static void *
|
static void *
|
||||||
aapoint_create_fs_state(struct pipe_context *pipe,
|
aapoint_create_fs_state(struct pipe_context *pipe,
|
||||||
|
|
|
@ -334,7 +334,7 @@ pstip_stage_from_pipe(struct pipe_context *pipe)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function overrides the driver's create_fs_state() function and
|
* This function overrides the driver's create_fs_state() function and
|
||||||
* will typically be called by the state tracker.
|
* will typically be called by the gallium frontend.
|
||||||
*/
|
*/
|
||||||
static void *
|
static void *
|
||||||
pstip_create_fs_state(struct pipe_context *pipe,
|
pstip_create_fs_state(struct pipe_context *pipe,
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
* that varies .x from 0 to 1 horizontally across the point and varies .y
|
* that varies .x from 0 to 1 horizontally across the point and varies .y
|
||||||
* vertically from 0 to 1 down the sprite.
|
* vertically from 0 to 1 down the sprite.
|
||||||
*
|
*
|
||||||
* With geometry shaders, the state tracker could create a GS to do
|
* With geometry shaders, the gallium frontends could create a GS to do
|
||||||
* most/all of this.
|
* most/all of this.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -425,7 +425,7 @@ draw_pt_arrays_restart(struct draw_context *draw,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Non-indexed prims (draw_arrays).
|
/* Non-indexed prims (draw_arrays).
|
||||||
* Primitive restart should have been handled in the state tracker.
|
* Primitive restart should have been handled in gallium frontends.
|
||||||
*/
|
*/
|
||||||
draw_pt_arrays(draw, prim, start, count);
|
draw_pt_arrays(draw, prim, start, count);
|
||||||
}
|
}
|
||||||
|
@ -556,7 +556,7 @@ draw_vbo(struct draw_context *draw,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: We could use draw->pt.max_index to further narrow
|
* TODO: We could use draw->pt.max_index to further narrow
|
||||||
* the min_index/max_index hints given by the state tracker.
|
* the min_index/max_index hints given by gallium frontends.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (instance = 0; instance < info->instance_count; instance++) {
|
for (instance = 0; instance < info->instance_count; instance++) {
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
* TGSI translation limits.
|
* TGSI translation limits.
|
||||||
*
|
*
|
||||||
* Some are slightly above SM 3.0 requirements to give some wiggle room to
|
* Some are slightly above SM 3.0 requirements to give some wiggle room to
|
||||||
* the state trackers.
|
* the gallium frontends.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LP_MAX_TGSI_TEMPS 4096
|
#define LP_MAX_TGSI_TEMPS 4096
|
||||||
|
|
|
@ -143,11 +143,11 @@ static void init_native_targets()
|
||||||
extern "C" void
|
extern "C" void
|
||||||
lp_set_target_options(void)
|
lp_set_target_options(void)
|
||||||
{
|
{
|
||||||
/* The llvm target registry is not thread-safe, so drivers and state-trackers
|
/* The llvm target registry is not thread-safe, so drivers and gallium frontends
|
||||||
* that want to initialize targets should use the lp_set_target_options()
|
* that want to initialize targets should use the lp_set_target_options()
|
||||||
* function to safely initialize targets.
|
* function to safely initialize targets.
|
||||||
*
|
*
|
||||||
* LLVM targets should be initialized before the driver or state-tracker tries
|
* LLVM targets should be initialized before the driver or gallium frontend tries
|
||||||
* to access the registry.
|
* to access the registry.
|
||||||
*/
|
*/
|
||||||
call_once(&init_native_targets_once_flag, init_native_targets);
|
call_once(&init_native_targets_once_flag, init_native_targets);
|
||||||
|
|
|
@ -179,7 +179,7 @@ lp_sampler_static_sampler_state(struct lp_static_sampler_state *state,
|
||||||
* spurious recompiles, as the sampler static state is part of the shader
|
* spurious recompiles, as the sampler static state is part of the shader
|
||||||
* key.
|
* key.
|
||||||
*
|
*
|
||||||
* Ideally the state tracker or cso_cache module would make all state
|
* Ideally gallium frontends or cso_cache module would make all state
|
||||||
* canonical, but until that happens it's better to be safe than sorry here.
|
* canonical, but until that happens it's better to be safe than sorry here.
|
||||||
*
|
*
|
||||||
* XXX: Actually there's much more than can be done here, especially
|
* XXX: Actually there's much more than can be done here, especially
|
||||||
|
|
|
@ -3124,7 +3124,7 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
|
||||||
* here which would say it's pure int despite such formats should sample
|
* here which would say it's pure int despite such formats should sample
|
||||||
* the depth component).
|
* the depth component).
|
||||||
* In GL such filters make the texture incomplete, this makes it robust
|
* In GL such filters make the texture incomplete, this makes it robust
|
||||||
* against state trackers which set this up regardless (we'd crash in the
|
* against gallium frontends which set this up regardless (we'd crash in the
|
||||||
* lerp later otherwise).
|
* lerp later otherwise).
|
||||||
* At least in some apis it may be legal to use such filters with lod
|
* At least in some apis it may be legal to use such filters with lod
|
||||||
* queries and/or gather (at least for gather d3d10 says only the wrap
|
* queries and/or gather (at least for gather d3d10 says only the wrap
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
/* This head-up display module can draw transparent graphs on top of what
|
/* This head-up display module can draw transparent graphs on top of what
|
||||||
* the app is rendering, visualizing various data like framerate, cpu load,
|
* the app is rendering, visualizing various data like framerate, cpu load,
|
||||||
* performance counters, etc. It can be hook up into any state tracker.
|
* performance counters, etc. It can be hook up into any gallium frontend.
|
||||||
*
|
*
|
||||||
* The HUD is controlled with the GALLIUM_HUD environment variable.
|
* The HUD is controlled with the GALLIUM_HUD environment variable.
|
||||||
* Set GALLIUM_HUD=help for more info.
|
* Set GALLIUM_HUD=help for more info.
|
||||||
|
|
|
@ -107,7 +107,7 @@ util_draw_max_index(
|
||||||
max_index = MIN2(max_index, buffer_max_index);
|
max_index = MIN2(max_index, buffer_max_index);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Per-instance data. Simply make sure the state tracker didn't
|
/* Per-instance data. Simply make sure gallium frontends didn't
|
||||||
* request more instances than those that fit in the buffer */
|
* request more instances than those that fit in the buffer */
|
||||||
if ((info->start_instance + info->instance_count)/element->instance_divisor
|
if ((info->start_instance + info->instance_count)/element->instance_divisor
|
||||||
> (buffer_max_index + 1)) {
|
> (buffer_max_index + 1)) {
|
||||||
|
|
|
@ -165,7 +165,7 @@ util_upload_index_buffer(struct pipe_context *pipe,
|
||||||
* CPU cores that share the same L3 cache. This is needed for good multi-
|
* CPU cores that share the same L3 cache. This is needed for good multi-
|
||||||
* threading performance on AMD Zen CPUs.
|
* threading performance on AMD Zen CPUs.
|
||||||
*
|
*
|
||||||
* \param upper_thread thread in the state tracker that also needs to be
|
* \param upper_thread thread in gallium frontends that also needs to be
|
||||||
* pinned.
|
* pinned.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
|
|
@ -111,7 +111,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
|
||||||
return 120;
|
return 120;
|
||||||
|
|
||||||
case PIPE_CAP_ESSL_FEATURE_LEVEL:
|
case PIPE_CAP_ESSL_FEATURE_LEVEL:
|
||||||
/* Tell state-tracker to fallback to PIPE_CAP_GLSL_FEATURE_LEVEL */
|
/* Tell gallium frontend to fallback to PIPE_CAP_GLSL_FEATURE_LEVEL */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
|
case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
|
||||||
|
|
|
@ -238,7 +238,7 @@ threaded_context_flush(struct pipe_context *_pipe,
|
||||||
{
|
{
|
||||||
struct threaded_context *tc = threaded_context(_pipe);
|
struct threaded_context *tc = threaded_context(_pipe);
|
||||||
|
|
||||||
/* This is called from the state-tracker / application thread. */
|
/* This is called from the gallium frontend / application thread. */
|
||||||
if (token->tc && token->tc == tc) {
|
if (token->tc && token->tc == tc) {
|
||||||
struct tc_batch *last = &tc->batch_slots[tc->last];
|
struct tc_batch *last = &tc->batch_slots[tc->last];
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RGBA/float tile get/put functions.
|
* RGBA/float tile get/put functions.
|
||||||
* Usable both by drivers and state trackers.
|
* Usable both by drivers and gallium frontends.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ struct u_transfer_vtbl {
|
||||||
* Must be implemented if separate stencil or fake_rgtc is used. The
|
* Must be implemented if separate stencil or fake_rgtc is used. The
|
||||||
* internal_format is the format the resource was created with. In
|
* internal_format is the format the resource was created with. In
|
||||||
* the case of separate stencil or fake_rgtc, prsc->format is set back
|
* the case of separate stencil or fake_rgtc, prsc->format is set back
|
||||||
* to the state tracker visible format (e.g. Z32_FLOAT_S8X24_UINT or
|
* to the gallium-frontend-visible format (e.g. Z32_FLOAT_S8X24_UINT or
|
||||||
* PIPE_FORMAT_{RTGC,LATC}* after the resource is created.
|
* PIPE_FORMAT_{RTGC,LATC}* after the resource is created.
|
||||||
*/
|
*/
|
||||||
enum pipe_format (*get_internal_format)(struct pipe_resource *prsc);
|
enum pipe_format (*get_internal_format)(struct pipe_resource *prsc);
|
||||||
|
|
|
@ -382,7 +382,7 @@ Queries
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
|
|
||||||
Queries gather some statistic from the 3D pipeline over one or more
|
Queries gather some statistic from the 3D pipeline over one or more
|
||||||
draws. Queries may be nested, though not all state trackers exercise this.
|
draws. Queries may be nested, though not all gallium frontends exercise this.
|
||||||
|
|
||||||
Queries can be created with ``create_query`` and deleted with
|
Queries can be created with ``create_query`` and deleted with
|
||||||
``destroy_query``. To start a query, use ``begin_query``, and when finished,
|
``destroy_query``. To start a query, use ``begin_query``, and when finished,
|
||||||
|
@ -856,7 +856,7 @@ for particular texture types or formats.
|
||||||
Device resets
|
Device resets
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
The state tracker can query or request notifications of when the GPU
|
Gallium frontends can query or request notifications of when the GPU
|
||||||
is reset for whatever reason (application error, driver error). When
|
is reset for whatever reason (application error, driver error). When
|
||||||
a GPU reset happens, the context becomes unusable and all related state
|
a GPU reset happens, the context becomes unusable and all related state
|
||||||
should be considered lost and undefined. Despite that, context
|
should be considered lost and undefined. Despite that, context
|
||||||
|
|
|
@ -21,7 +21,7 @@ OpenGL: glClampColor(GL_CLAMP_VERTEX_COLOR) in GL 3.0 or GL_ARB_color_buffer_flo
|
||||||
D3D11: seems always disabled
|
D3D11: seems always disabled
|
||||||
|
|
||||||
Note the PIPE_CAP_VERTEX_COLOR_CLAMPED query indicates whether or not the
|
Note the PIPE_CAP_VERTEX_COLOR_CLAMPED query indicates whether or not the
|
||||||
driver supports this control. If it's not supported, the state tracker may
|
driver supports this control. If it's not supported, gallium frontends may
|
||||||
have to insert extra clamping code.
|
have to insert extra clamping code.
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ OpenGL: glClampColor(GL_CLAMP_FRAGMENT_COLOR) in GL 3.0 or ARB_color_buffer_floa
|
||||||
D3D11: seems always disabled
|
D3D11: seems always disabled
|
||||||
|
|
||||||
Note the PIPE_CAP_FRAGMENT_COLOR_CLAMPED query indicates whether or not the
|
Note the PIPE_CAP_FRAGMENT_COLOR_CLAMPED query indicates whether or not the
|
||||||
driver supports this control. If it's not supported, the state tracker may
|
driver supports this control. If it's not supported, gallium frontends may
|
||||||
have to insert extra clamping code.
|
have to insert extra clamping code.
|
||||||
|
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ the state of 'sprite_coord_mode' (see below).
|
||||||
If any bit is set, then point_smooth MUST be disabled (there are no
|
If any bit is set, then point_smooth MUST be disabled (there are no
|
||||||
round sprites) and point_quad_rasterization MUST be true (sprites are
|
round sprites) and point_quad_rasterization MUST be true (sprites are
|
||||||
always rasterized as quads). Any mismatch between these states should
|
always rasterized as quads). Any mismatch between these states should
|
||||||
be considered a bug in the state-tracker.
|
be considered a bug in the gallium frontend.
|
||||||
|
|
||||||
This feature is implemented in the :ref:`Draw` module but may also be
|
This feature is implemented in the :ref:`Draw` module but may also be
|
||||||
implemented natively by GPUs or implemented with a geometry shader.
|
implemented natively by GPUs or implemented with a geometry shader.
|
||||||
|
|
|
@ -46,8 +46,8 @@ the shader sanity checker prints its warnings and errors to stderr.
|
||||||
Whether the :ref:`Draw` module will attempt to use LLVM for vertex and geometry shaders.
|
Whether the :ref:`Draw` module will attempt to use LLVM for vertex and geometry shaders.
|
||||||
|
|
||||||
|
|
||||||
State tracker-specific
|
GL State tracker-specific
|
||||||
""""""""""""""""""""""
|
"""""""""""""""""""""""""
|
||||||
|
|
||||||
.. envvar:: ST_DEBUG <flags> (0x0)
|
.. envvar:: ST_DEBUG <flags> (0x0)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Distribution
|
Distribution
|
||||||
============
|
============
|
||||||
|
|
||||||
Along with the interface definitions, the following drivers, state trackers,
|
Along with the interface definitions, the following drivers, gallium frontends,
|
||||||
and auxiliary modules are shipped in the standard Gallium distribution.
|
and auxiliary modules are shipped in the standard Gallium distribution.
|
||||||
|
|
||||||
Drivers
|
Drivers
|
||||||
|
@ -78,8 +78,8 @@ Rbug
|
||||||
|
|
||||||
Wrapper driver. :ref:`rbug` driver used with stand alone rbug-gui.
|
Wrapper driver. :ref:`rbug` driver used with stand alone rbug-gui.
|
||||||
|
|
||||||
State Trackers
|
Gallium frontends
|
||||||
--------------
|
-----------------
|
||||||
|
|
||||||
Clover
|
Clover
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
@ -101,9 +101,9 @@ GLX
|
||||||
MesaGL
|
MesaGL
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
|
||||||
Tracker implementing a GL state machine. Not usable as a standalone tracker;
|
The gallium frontend implementing a GL state machine. Not usable as
|
||||||
Mesa should be built with another state tracker, such as :ref:`DRI` or
|
a standalone frontend; Mesa should be built with another gallium frontend,
|
||||||
:ref:`EGL`.
|
such as :ref:`DRI` or :ref:`EGL`.
|
||||||
|
|
||||||
VDPAU
|
VDPAU
|
||||||
^^^^^
|
^^^^^
|
||||||
|
|
|
@ -85,7 +85,7 @@ The integer capabilities:
|
||||||
per-instance vertex attribs.
|
per-instance vertex attribs.
|
||||||
* ``PIPE_CAP_FRAGMENT_COLOR_CLAMPED``: Whether fragment color clamping is
|
* ``PIPE_CAP_FRAGMENT_COLOR_CLAMPED``: Whether fragment color clamping is
|
||||||
supported. That is, is the pipe_rasterizer_state::clamp_fragment_color
|
supported. That is, is the pipe_rasterizer_state::clamp_fragment_color
|
||||||
flag supported by the driver? If not, the state tracker will insert
|
flag supported by the driver? If not, gallium frontends will insert
|
||||||
clamping code into the fragment shaders when needed.
|
clamping code into the fragment shaders when needed.
|
||||||
|
|
||||||
* ``PIPE_CAP_MIXED_COLORBUFFER_FORMATS``: Whether mixed colorbuffer formats are
|
* ``PIPE_CAP_MIXED_COLORBUFFER_FORMATS``: Whether mixed colorbuffer formats are
|
||||||
|
@ -99,7 +99,7 @@ The integer capabilities:
|
||||||
the vertex colors are never clamped. This is the default for DX10 hardware.
|
the vertex colors are never clamped. This is the default for DX10 hardware.
|
||||||
If both clamped and unclamped CAPs are supported, the clamping can be
|
If both clamped and unclamped CAPs are supported, the clamping can be
|
||||||
controlled through pipe_rasterizer_state. If the driver cannot do vertex
|
controlled through pipe_rasterizer_state. If the driver cannot do vertex
|
||||||
color clamping, the state tracker may insert clamping code into the vertex
|
color clamping, gallium frontends may insert clamping code into the vertex
|
||||||
shader.
|
shader.
|
||||||
* ``PIPE_CAP_GLSL_FEATURE_LEVEL``: Whether the driver supports features
|
* ``PIPE_CAP_GLSL_FEATURE_LEVEL``: Whether the driver supports features
|
||||||
equivalent to a specific GLSL version. E.g. for GLSL 1.3, report 130.
|
equivalent to a specific GLSL version. E.g. for GLSL 1.3, report 130.
|
||||||
|
@ -121,7 +121,7 @@ The integer capabilities:
|
||||||
* ``PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION``: Whether quads adhere to
|
* ``PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION``: Whether quads adhere to
|
||||||
the flatshade_first setting in ``pipe_rasterizer_state``.
|
the flatshade_first setting in ``pipe_rasterizer_state``.
|
||||||
* ``PIPE_CAP_USER_VERTEX_BUFFERS``: Whether the driver supports user vertex
|
* ``PIPE_CAP_USER_VERTEX_BUFFERS``: Whether the driver supports user vertex
|
||||||
buffers. If not, the state tracker must upload all data which is not in hw
|
buffers. If not, gallium frontends must upload all data which is not in hw
|
||||||
resources. If user-space buffers are supported, the driver must also still
|
resources. If user-space buffers are supported, the driver must also still
|
||||||
accept HW resource buffers.
|
accept HW resource buffers.
|
||||||
* ``PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY``: This CAP describes a hw
|
* ``PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY``: This CAP describes a hw
|
||||||
|
@ -164,7 +164,7 @@ The integer capabilities:
|
||||||
input that will always be replaced with sprite coordinates.
|
input that will always be replaced with sprite coordinates.
|
||||||
* ``PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER``: Whether it is preferable
|
* ``PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER``: Whether it is preferable
|
||||||
to use a blit to implement a texture transfer which needs format conversions
|
to use a blit to implement a texture transfer which needs format conversions
|
||||||
and swizzling in state trackers. Generally, all hardware drivers with
|
and swizzling in gallium frontends. Generally, all hardware drivers with
|
||||||
dedicated memory should return 1 and all software rasterizers should return 0.
|
dedicated memory should return 1 and all software rasterizers should return 0.
|
||||||
* ``PIPE_CAP_QUERY_PIPELINE_STATISTICS``: Whether PIPE_QUERY_PIPELINE_STATISTICS
|
* ``PIPE_CAP_QUERY_PIPELINE_STATISTICS``: Whether PIPE_QUERY_PIPELINE_STATISTICS
|
||||||
is supported.
|
is supported.
|
||||||
|
@ -256,7 +256,7 @@ The integer capabilities:
|
||||||
for enabling ARB_clip_control.
|
for enabling ARB_clip_control.
|
||||||
* ``PIPE_CAP_VERTEXID_NOBASE``: If true, the driver only supports
|
* ``PIPE_CAP_VERTEXID_NOBASE``: If true, the driver only supports
|
||||||
TGSI_SEMANTIC_VERTEXID_NOBASE (and not TGSI_SEMANTIC_VERTEXID). This means
|
TGSI_SEMANTIC_VERTEXID_NOBASE (and not TGSI_SEMANTIC_VERTEXID). This means
|
||||||
state trackers for APIs whose vertexIDs are offset by basevertex (such as GL)
|
gallium frontends for APIs whose vertexIDs are offset by basevertex (such as GL)
|
||||||
will need to lower TGSI_SEMANTIC_VERTEXID to TGSI_SEMANTIC_VERTEXID_NOBASE
|
will need to lower TGSI_SEMANTIC_VERTEXID to TGSI_SEMANTIC_VERTEXID_NOBASE
|
||||||
and TGSI_SEMANTIC_BASEVERTEX, so drivers setting this must handle both these
|
and TGSI_SEMANTIC_BASEVERTEX, so drivers setting this must handle both these
|
||||||
semantics. Only relevant if geometry shaders are supported.
|
semantics. Only relevant if geometry shaders are supported.
|
||||||
|
@ -310,11 +310,11 @@ The integer capabilities:
|
||||||
supported in vertex shaders.
|
supported in vertex shaders.
|
||||||
* ``PIPE_CAP_TGSI_PACK_HALF_FLOAT``: Whether the ``UP2H`` and ``PK2H``
|
* ``PIPE_CAP_TGSI_PACK_HALF_FLOAT``: Whether the ``UP2H`` and ``PK2H``
|
||||||
TGSI opcodes are supported.
|
TGSI opcodes are supported.
|
||||||
* ``PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL``: If state trackers should use
|
* ``PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL``: If gallium frontends should use
|
||||||
a system value for the POSITION fragment shader input.
|
a system value for the POSITION fragment shader input.
|
||||||
* ``PIPE_CAP_TGSI_FS_POINT_IS_SYSVAL``: If state trackers should use
|
* ``PIPE_CAP_TGSI_FS_POINT_IS_SYSVAL``: If gallium frontends should use
|
||||||
a system value for the POINT fragment shader input.
|
a system value for the POINT fragment shader input.
|
||||||
* ``PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL``: If state trackers should use
|
* ``PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL``: If gallium frontends should use
|
||||||
a system value for the FACE fragment shader input.
|
a system value for the FACE fragment shader input.
|
||||||
Also, the FACE system value is integer, not float.
|
Also, the FACE system value is integer, not float.
|
||||||
* ``PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT``: Describes the required
|
* ``PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT``: Describes the required
|
||||||
|
@ -528,7 +528,7 @@ The integer capabilities:
|
||||||
A driver might rely on the input mapping that was defined with the original
|
A driver might rely on the input mapping that was defined with the original
|
||||||
GLSL code.
|
GLSL code.
|
||||||
* ``PIPE_CAP_IMAGE_LOAD_FORMATTED``: True if a format for image loads does not need to be specified in the shader IR
|
* ``PIPE_CAP_IMAGE_LOAD_FORMATTED``: True if a format for image loads does not need to be specified in the shader IR
|
||||||
* ``PIPE_CAP_THROTTLE``: Whether or not state trackers should throttle pipe_context
|
* ``PIPE_CAP_THROTTLE``: Whether or not gallium frontends should throttle pipe_context
|
||||||
execution. 0 = throttling is disabled.
|
execution. 0 = throttling is disabled.
|
||||||
* ``PIPE_CAP_DMABUF``: Whether Linux DMABUF handles are supported by
|
* ``PIPE_CAP_DMABUF``: Whether Linux DMABUF handles are supported by
|
||||||
resource_from_handle and resource_get_handle.
|
resource_from_handle and resource_get_handle.
|
||||||
|
@ -537,7 +537,7 @@ The integer capabilities:
|
||||||
* ``PIPE_CAP_FRAGMENT_SHADER_INTERLOCK``: True if fragment shader interlock
|
* ``PIPE_CAP_FRAGMENT_SHADER_INTERLOCK``: True if fragment shader interlock
|
||||||
functionality is supported.
|
functionality is supported.
|
||||||
* ``PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED``: True if driver handles
|
* ``PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED``: True if driver handles
|
||||||
gl_LocalInvocationIndex and gl_GlobalInvocationID. Otherwise, state tracker will
|
gl_LocalInvocationIndex and gl_GlobalInvocationID. Otherwise, gallium frontends will
|
||||||
lower those system values.
|
lower those system values.
|
||||||
* ``PIPE_CAP_ATOMIC_FLOAT_MINMAX``: Atomic float point minimum,
|
* ``PIPE_CAP_ATOMIC_FLOAT_MINMAX``: Atomic float point minimum,
|
||||||
maximum, exchange and compare-and-swap support to buffer and shared variables.
|
maximum, exchange and compare-and-swap support to buffer and shared variables.
|
||||||
|
@ -552,7 +552,7 @@ The integer capabilities:
|
||||||
types with texture functions having interaction with LOD of texture lookup.
|
types with texture functions having interaction with LOD of texture lookup.
|
||||||
* ``PIPE_CAP_SHADER_SAMPLES_IDENTICAL``: True if the driver supports a shader query to tell whether all samples of a multisampled surface are definitely identical.
|
* ``PIPE_CAP_SHADER_SAMPLES_IDENTICAL``: True if the driver supports a shader query to tell whether all samples of a multisampled surface are definitely identical.
|
||||||
* ``PIPE_CAP_TGSI_ATOMINC_WRAP``: Atomic increment/decrement + wrap around are supported.
|
* ``PIPE_CAP_TGSI_ATOMINC_WRAP``: Atomic increment/decrement + wrap around are supported.
|
||||||
* ``PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF``: True if the state tracker should
|
* ``PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF``: True if gallium frontends should
|
||||||
turn arrays whose contents can be deduced at compile time into constant
|
turn arrays whose contents can be deduced at compile time into constant
|
||||||
buffer loads, or false if the driver can handle such arrays itself in a more
|
buffer loads, or false if the driver can handle such arrays itself in a more
|
||||||
efficient manner.
|
efficient manner.
|
||||||
|
@ -667,7 +667,7 @@ MOV OUT[0], CONST[0][3] # copy vector 3 of constbuf 0
|
||||||
ignore tgsi_declaration_range::Last for shader inputs and outputs.
|
ignore tgsi_declaration_range::Last for shader inputs and outputs.
|
||||||
* ``PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT``: This is the maximum number
|
* ``PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT``: This is the maximum number
|
||||||
of iterations that loops are allowed to have to be unrolled. It is only
|
of iterations that loops are allowed to have to be unrolled. It is only
|
||||||
a hint to state trackers. Whether any loops will be unrolled is not
|
a hint to gallium frontends. Whether any loops will be unrolled is not
|
||||||
guaranteed.
|
guaranteed.
|
||||||
* ``PIPE_SHADER_CAP_MAX_SHADER_BUFFERS``: Maximum number of memory buffers
|
* ``PIPE_SHADER_CAP_MAX_SHADER_BUFFERS``: Maximum number of memory buffers
|
||||||
(also used to implement atomic counters). Having this be non-0 also
|
(also used to implement atomic counters). Having this be non-0 also
|
||||||
|
@ -677,7 +677,7 @@ MOV OUT[0], CONST[0][3] # copy vector 3 of constbuf 0
|
||||||
program. It should be a mask of ``pipe_shader_ir`` bits.
|
program. It should be a mask of ``pipe_shader_ir`` bits.
|
||||||
* ``PIPE_SHADER_CAP_MAX_SHADER_IMAGES``: Maximum number of image units.
|
* ``PIPE_SHADER_CAP_MAX_SHADER_IMAGES``: Maximum number of image units.
|
||||||
* ``PIPE_SHADER_CAP_LOWER_IF_THRESHOLD``: IF and ELSE branches with a lower
|
* ``PIPE_SHADER_CAP_LOWER_IF_THRESHOLD``: IF and ELSE branches with a lower
|
||||||
cost than this value should be lowered by the state tracker for better
|
cost than this value should be lowered by gallium frontends for better
|
||||||
performance. This is a tunable for the GLSL compiler and the behavior is
|
performance. This is a tunable for the GLSL compiler and the behavior is
|
||||||
specific to the compiler.
|
specific to the compiler.
|
||||||
* ``PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERS``: Whether the merge registers
|
* ``PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERS``: Whether the merge registers
|
||||||
|
|
|
@ -2506,7 +2506,7 @@ after lookup.
|
||||||
If per-sample shading is not in effect or the source resource or render
|
If per-sample shading is not in effect or the source resource or render
|
||||||
target is not multisampled, the result is (0.5, 0.5, undef, undef).
|
target is not multisampled, the result is (0.5, 0.5, undef, undef).
|
||||||
|
|
||||||
NOTE: no driver has implemented this opcode yet (and no state tracker
|
NOTE: no driver has implemented this opcode yet (and no gallium frontend
|
||||||
emits it). This information is subject to change.
|
emits it). This information is subject to change.
|
||||||
|
|
||||||
.. opcode:: SAMPLE_INFO
|
.. opcode:: SAMPLE_INFO
|
||||||
|
@ -2525,7 +2525,7 @@ after lookup.
|
||||||
If per-sample shading is not in effect or the source resource or render
|
If per-sample shading is not in effect or the source resource or render
|
||||||
target is not multisampled, the result is (1, 0, 0, 0).
|
target is not multisampled, the result is (1, 0, 0, 0).
|
||||||
|
|
||||||
NOTE: no driver has implemented this opcode yet (and no state tracker
|
NOTE: no driver has implemented this opcode yet (and no gallium frontend
|
||||||
emits it). This information is subject to change.
|
emits it). This information is subject to change.
|
||||||
|
|
||||||
.. opcode:: LOD - level of detail
|
.. opcode:: LOD - level of detail
|
||||||
|
|
|
@ -574,7 +574,7 @@ etna_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
||||||
|
|
||||||
/* context ctxate setup */
|
/* context ctxate setup */
|
||||||
ctx->screen = screen;
|
ctx->screen = screen;
|
||||||
/* need some sane default in case state tracker doesn't set some state: */
|
/* need some sane default in case gallium frontends don't set some state: */
|
||||||
ctx->sample_mask = 0xffff;
|
ctx->sample_mask = 0xffff;
|
||||||
|
|
||||||
/* Set sensible defaults for state */
|
/* Set sensible defaults for state */
|
||||||
|
|
|
@ -90,7 +90,7 @@ etna_set_constant_buffer(struct pipe_context *pctx,
|
||||||
|
|
||||||
util_copy_constant_buffer(&so->cb[index], cb);
|
util_copy_constant_buffer(&so->cb[index], cb);
|
||||||
|
|
||||||
/* Note that the state tracker can unbind constant buffers by
|
/* Note that the gallium frontends can unbind constant buffers by
|
||||||
* passing NULL here. */
|
* passing NULL here. */
|
||||||
if (unlikely(!cb || (!cb->buffer && !cb->user_buffer))) {
|
if (unlikely(!cb || (!cb->buffer && !cb->user_buffer))) {
|
||||||
so->enabled_mask &= ~(1 << index);
|
so->enabled_mask &= ~(1 << index);
|
||||||
|
|
|
@ -380,7 +380,7 @@ fd_context_init(struct fd_context *ctx, struct pipe_screen *pscreen,
|
||||||
|
|
||||||
(void) mtx_init(&ctx->gmem_lock, mtx_plain);
|
(void) mtx_init(&ctx->gmem_lock, mtx_plain);
|
||||||
|
|
||||||
/* need some sane default in case state tracker doesn't
|
/* need some sane default in case gallium frontends don't
|
||||||
* set some state:
|
* set some state:
|
||||||
*/
|
*/
|
||||||
ctx->sample_mask = 0xffff;
|
ctx->sample_mask = 0xffff;
|
||||||
|
|
|
@ -380,7 +380,7 @@ fd_try_shadow_resource(struct fd_context *ctx, struct fd_resource *rsc,
|
||||||
* Uncompress an UBWC compressed buffer "in place". This works basically
|
* Uncompress an UBWC compressed buffer "in place". This works basically
|
||||||
* like resource shadowing, creating a new resource, and doing an uncompress
|
* like resource shadowing, creating a new resource, and doing an uncompress
|
||||||
* blit, and swapping the state between shadow and original resource so it
|
* blit, and swapping the state between shadow and original resource so it
|
||||||
* appears to the state tracker as if nothing changed.
|
* appears to the gallium frontends as if nothing changed.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
fd_resource_uncompress(struct fd_context *ctx, struct fd_resource *rsc)
|
fd_resource_uncompress(struct fd_context *ctx, struct fd_resource *rsc)
|
||||||
|
|
|
@ -104,7 +104,7 @@ fd_set_constant_buffer(struct pipe_context *pctx,
|
||||||
|
|
||||||
util_copy_constant_buffer(&so->cb[index], cb);
|
util_copy_constant_buffer(&so->cb[index], cb);
|
||||||
|
|
||||||
/* Note that the state tracker can unbind constant buffers by
|
/* Note that gallium frontends can unbind constant buffers by
|
||||||
* passing NULL here.
|
* passing NULL here.
|
||||||
*/
|
*/
|
||||||
if (unlikely(!cb)) {
|
if (unlikely(!cb)) {
|
||||||
|
|
|
@ -888,7 +888,7 @@ static void i915_set_clip_state( struct pipe_context *pipe,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Called when driver state tracker notices changes to the viewport
|
/* Called when gallium frontends notice changes to the viewport
|
||||||
* matrix:
|
* matrix:
|
||||||
*/
|
*/
|
||||||
static void i915_set_viewport_states( struct pipe_context *pipe,
|
static void i915_set_viewport_states( struct pipe_context *pipe,
|
||||||
|
|
|
@ -731,7 +731,7 @@ _iris_batch_flush(struct iris_batch *batch, const char *file, int line)
|
||||||
*/
|
*/
|
||||||
if (ret == -EIO && replace_hw_ctx(batch)) {
|
if (ret == -EIO && replace_hw_ctx(batch)) {
|
||||||
if (batch->reset->reset) {
|
if (batch->reset->reset) {
|
||||||
/* Tell the state tracker the device is lost and it was our fault. */
|
/* Tell gallium frontends the device is lost and it was our fault. */
|
||||||
batch->reset->reset(batch->reset->data, PIPE_GUILTY_CONTEXT_RESET);
|
batch->reset->reset(batch->reset->data, PIPE_GUILTY_CONTEXT_RESET);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@ iris_is_format_supported(struct pipe_screen *pscreen,
|
||||||
|
|
||||||
/* Don't advertise 3-component RGB formats for non-buffer textures.
|
/* Don't advertise 3-component RGB formats for non-buffer textures.
|
||||||
* This ensures that they are renderable from an API perspective since
|
* This ensures that they are renderable from an API perspective since
|
||||||
* the state tracker will fall back to RGBA or RGBX, which are
|
* gallium frontends will fall back to RGBA or RGBX, which are
|
||||||
* renderable. We want to render internally for copies and blits,
|
* renderable. We want to render internally for copies and blits,
|
||||||
* even if the application doesn't.
|
* even if the application doesn't.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1334,7 +1334,7 @@ iris_create_zsa_state(struct pipe_context *ctx,
|
||||||
state->stencil[0].writemask != 0 ||
|
state->stencil[0].writemask != 0 ||
|
||||||
(two_sided_stencil && state->stencil[1].writemask != 0);
|
(two_sided_stencil && state->stencil[1].writemask != 0);
|
||||||
|
|
||||||
/* The state tracker needs to optimize away EQUAL writes for us. */
|
/* gallium frontends need to optimize away EQUAL writes for us. */
|
||||||
assert(!(state->depth.func == PIPE_FUNC_EQUAL && state->depth.writemask));
|
assert(!(state->depth.func == PIPE_FUNC_EQUAL && state->depth.writemask));
|
||||||
|
|
||||||
iris_pack_command(GENX(3DSTATE_WM_DEPTH_STENCIL), cso->wmds, wmds) {
|
iris_pack_command(GENX(3DSTATE_WM_DEPTH_STENCIL), cso->wmds, wmds) {
|
||||||
|
@ -1987,7 +1987,7 @@ iris_upload_sampler_states(struct iris_context *ice, gl_shader_stage stage)
|
||||||
struct iris_shader_state *shs = &ice->state.shaders[stage];
|
struct iris_shader_state *shs = &ice->state.shaders[stage];
|
||||||
const struct shader_info *info = iris_get_shader_info(ice, stage);
|
const struct shader_info *info = iris_get_shader_info(ice, stage);
|
||||||
|
|
||||||
/* We assume the state tracker will call pipe->bind_sampler_states()
|
/* We assume gallium frontends will call pipe->bind_sampler_states()
|
||||||
* if the program's number of textures changes.
|
* if the program's number of textures changes.
|
||||||
*/
|
*/
|
||||||
unsigned count = info ? util_last_bit(info->textures_used) : 0;
|
unsigned count = info ? util_last_bit(info->textures_used) : 0;
|
||||||
|
@ -2586,7 +2586,7 @@ iris_create_surface(struct pipe_context *ctx,
|
||||||
* texture, the tile offsets may be anything and we can't rely on
|
* texture, the tile offsets may be anything and we can't rely on
|
||||||
* X/Y Offset.
|
* X/Y Offset.
|
||||||
*
|
*
|
||||||
* Return NULL to force the state tracker to take fallback paths.
|
* Return NULL to force gallium frontends to take fallback paths.
|
||||||
*/
|
*/
|
||||||
if (view->array_len > 1 || GEN_GEN == 8)
|
if (view->array_len > 1 || GEN_GEN == 8)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -440,7 +440,7 @@ lp_setup_try_clear_color_buffer(struct lp_setup_context *setup,
|
||||||
else {
|
else {
|
||||||
/* Put ourselves into the 'pre-clear' state, specifically to try
|
/* Put ourselves into the 'pre-clear' state, specifically to try
|
||||||
* and accumulate multiple clears to color and depth_stencil
|
* and accumulate multiple clears to color and depth_stencil
|
||||||
* buffers which the app or state-tracker might issue
|
* buffers which the app or gallium frontend might issue
|
||||||
* separately.
|
* separately.
|
||||||
*/
|
*/
|
||||||
set_scene_state( setup, SETUP_CLEARED, __FUNCTION__ );
|
set_scene_state( setup, SETUP_CLEARED, __FUNCTION__ );
|
||||||
|
@ -504,7 +504,7 @@ lp_setup_try_clear_zs(struct lp_setup_context *setup,
|
||||||
else {
|
else {
|
||||||
/* Put ourselves into the 'pre-clear' state, specifically to try
|
/* Put ourselves into the 'pre-clear' state, specifically to try
|
||||||
* and accumulate multiple clears to color and depth_stencil
|
* and accumulate multiple clears to color and depth_stencil
|
||||||
* buffers which the app or state-tracker might issue
|
* buffers which the app or gallium frontend might issue
|
||||||
* separately.
|
* separately.
|
||||||
*/
|
*/
|
||||||
set_scene_state( setup, SETUP_CLEARED, __FUNCTION__ );
|
set_scene_state( setup, SETUP_CLEARED, __FUNCTION__ );
|
||||||
|
|
|
@ -178,7 +178,7 @@ compute_vertex_info(struct llvmpipe_context *llvmpipe)
|
||||||
* Called just prior to drawing anything (pipe::draw_arrays(), etc).
|
* Called just prior to drawing anything (pipe::draw_arrays(), etc).
|
||||||
*
|
*
|
||||||
* Hopefully this will remain quite simple, otherwise need to pull in
|
* Hopefully this will remain quite simple, otherwise need to pull in
|
||||||
* something like the state tracker mechanism.
|
* something like the gallium frontend mechanism.
|
||||||
*/
|
*/
|
||||||
void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe )
|
void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe )
|
||||||
{
|
{
|
||||||
|
|
|
@ -191,7 +191,7 @@ llvmpipe_create_sampler_view(struct pipe_context *pipe,
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
/*
|
/*
|
||||||
* This is possibly too lenient, but the primary reason is just
|
* This is possibly too lenient, but the primary reason is just
|
||||||
* to catch state trackers which forget to initialize this, so
|
* to catch gallium frontends which forget to initialize this, so
|
||||||
* it only catches clearly impossible view targets.
|
* it only catches clearly impossible view targets.
|
||||||
*/
|
*/
|
||||||
if (view->target != texture->target) {
|
if (view->target != texture->target) {
|
||||||
|
|
|
@ -545,7 +545,7 @@ llvmpipe_transfer_map_ms( struct pipe_context *pipe,
|
||||||
do_not_block,
|
do_not_block,
|
||||||
__FUNCTION__)) {
|
__FUNCTION__)) {
|
||||||
/*
|
/*
|
||||||
* It would have blocked, but state tracker requested no to.
|
* It would have blocked, but gallium frontend requested no to.
|
||||||
*/
|
*/
|
||||||
assert(do_not_block);
|
assert(do_not_block);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -57,7 +57,7 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
|
||||||
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
|
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Short-circuit the rest of the logic -- this is used by the state tracker
|
/* Short-circuit the rest of the logic -- this is used by the gallium frontend
|
||||||
* to determine valid MS levels in a no-attachments scenario.
|
* to determine valid MS levels in a no-attachments scenario.
|
||||||
*/
|
*/
|
||||||
if (format == PIPE_FORMAT_NONE && bindings & PIPE_BIND_RENDER_TARGET)
|
if (format == PIPE_FORMAT_NONE && bindings & PIPE_BIND_RENDER_TARGET)
|
||||||
|
|
|
@ -1313,7 +1313,7 @@ panfrost_batch_clear(struct panfrost_batch *batch,
|
||||||
|
|
||||||
/* Clearing affects the entire framebuffer (by definition -- this is
|
/* Clearing affects the entire framebuffer (by definition -- this is
|
||||||
* the Gallium clear callback, which clears the whole framebuffer. If
|
* the Gallium clear callback, which clears the whole framebuffer. If
|
||||||
* the scissor test were enabled from the GL side, the state tracker
|
* the scissor test were enabled from the GL side, the gallium frontend
|
||||||
* would emit a quad instead and we wouldn't go down this code path) */
|
* would emit a quad instead and we wouldn't go down this code path) */
|
||||||
|
|
||||||
panfrost_batch_union_scissor(batch, 0, 0,
|
panfrost_batch_union_scissor(batch, 0, 0,
|
||||||
|
|
|
@ -254,7 +254,7 @@ panfrost_mfbd_set_zsbuf(
|
||||||
|
|
||||||
if (rsrc->layout == MALI_TEXTURE_AFBC) {
|
if (rsrc->layout == MALI_TEXTURE_AFBC) {
|
||||||
/* The only Z/S format we can compress is Z24S8 or variants
|
/* The only Z/S format we can compress is Z24S8 or variants
|
||||||
* thereof (handled by the state tracker) */
|
* thereof (handled by the gallium frontend) */
|
||||||
assert(panfrost_is_z24s8_variant(surf->format));
|
assert(panfrost_is_z24s8_variant(surf->format));
|
||||||
|
|
||||||
unsigned header_size = rsrc->slices[level].header_size;
|
unsigned header_size = rsrc->slices[level].header_size;
|
||||||
|
|
|
@ -817,7 +817,7 @@ panfrost_generate_mipmap(
|
||||||
PIPE_TEX_FILTER_LINEAR);
|
PIPE_TEX_FILTER_LINEAR);
|
||||||
|
|
||||||
/* If the blit was successful, flush once more. If it wasn't, well, let
|
/* If the blit was successful, flush once more. If it wasn't, well, let
|
||||||
* the state tracker deal with it. */
|
* the gallium frontend deal with it. */
|
||||||
|
|
||||||
if (blit_res) {
|
if (blit_res) {
|
||||||
panfrost_flush_batches_accessing_bo(ctx, rsrc->bo, PAN_BO_ACCESS_WRITE);
|
panfrost_flush_batches_accessing_bo(ctx, rsrc->bo, PAN_BO_ACCESS_WRITE);
|
||||||
|
|
|
@ -506,7 +506,7 @@ panfrost_is_format_supported( struct pipe_screen *screen,
|
||||||
* and then in the off-chance there's a CPU read we blit back to
|
* and then in the off-chance there's a CPU read we blit back to
|
||||||
* staging.
|
* staging.
|
||||||
*
|
*
|
||||||
* ...alternatively, we can make the state tracker deal with that. */
|
* ...alternatively, we can make the gallium frontend deal with that. */
|
||||||
|
|
||||||
if (bind & PIPE_BIND_DEPTH_STENCIL) {
|
if (bind & PIPE_BIND_DEPTH_STENCIL) {
|
||||||
switch (format) {
|
switch (format) {
|
||||||
|
|
|
@ -262,7 +262,7 @@ static boolean r300_setup_atoms(struct r300_context* r300)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Not every state tracker calls every driver function before the first draw
|
/* Not every gallium frontend calls every driver function before the first draw
|
||||||
* call and we must initialize the command buffers somehow. */
|
* call and we must initialize the command buffers somehow. */
|
||||||
static void r300_init_states(struct pipe_context *pipe)
|
static void r300_init_states(struct pipe_context *pipe)
|
||||||
{
|
{
|
||||||
|
|
|
@ -280,7 +280,7 @@ struct r300_constant_buffer {
|
||||||
* This is not a subclass of pipe_query because pipe_query is never
|
* This is not a subclass of pipe_query because pipe_query is never
|
||||||
* actually fully defined. So, rather than have it as a member, and do
|
* actually fully defined. So, rather than have it as a member, and do
|
||||||
* subclass-style casting, we treat pipe_query as an opaque, and just
|
* subclass-style casting, we treat pipe_query as an opaque, and just
|
||||||
* trust that our state tracker does not ever mess up query objects.
|
* trust that our gallium frontend does not ever mess up query objects.
|
||||||
*/
|
*/
|
||||||
struct r300_query {
|
struct r300_query {
|
||||||
/* The kind of query. Currently only OQ is supported. */
|
/* The kind of query. Currently only OQ is supported. */
|
||||||
|
|
|
@ -324,7 +324,7 @@ static boolean immd_is_good_idea(struct r300_context *r300,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Buffers can only be used for read by r300 (except query buffers, but
|
/* Buffers can only be used for read by r300 (except query buffers, but
|
||||||
* those can't be bound by a state tracker as vertex buffers). */
|
* those can't be bound by an gallium frontend as vertex buffers). */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -356,9 +356,9 @@ static void r600_flush_from_st(struct pipe_context *ctx,
|
||||||
ws->cs_sync_flush(rctx->gfx.cs);
|
ws->cs_sync_flush(rctx->gfx.cs);
|
||||||
} else {
|
} else {
|
||||||
/* Instead of flushing, create a deferred fence. Constraints:
|
/* Instead of flushing, create a deferred fence. Constraints:
|
||||||
* - The state tracker must allow a deferred flush.
|
* - the gallium frontend must allow a deferred flush.
|
||||||
* - The state tracker must request a fence.
|
* - the gallium frontend must request a fence.
|
||||||
* Thread safety in fence_finish must be ensured by the state tracker.
|
* Thread safety in fence_finish must be ensured by the gallium frontend.
|
||||||
*/
|
*/
|
||||||
if (flags & PIPE_FLUSH_DEFERRED && fence) {
|
if (flags & PIPE_FLUSH_DEFERRED && fence) {
|
||||||
gfx_fence = rctx->ws->cs_get_next_fence(rctx->gfx.cs);
|
gfx_fence = rctx->ws->cs_get_next_fence(rctx->gfx.cs);
|
||||||
|
|
|
@ -1191,7 +1191,7 @@ static void r600_set_constant_buffer(struct pipe_context *ctx,
|
||||||
struct pipe_constant_buffer *cb;
|
struct pipe_constant_buffer *cb;
|
||||||
const uint8_t *ptr;
|
const uint8_t *ptr;
|
||||||
|
|
||||||
/* Note that the state tracker can unbind constant buffers by
|
/* Note that the gallium frontend can unbind constant buffers by
|
||||||
* passing NULL here.
|
* passing NULL here.
|
||||||
*/
|
*/
|
||||||
if (unlikely(!input || (!input->buffer && !input->user_buffer))) {
|
if (unlikely(!input || (!input->buffer && !input->user_buffer))) {
|
||||||
|
@ -1871,7 +1871,7 @@ static bool r600_update_derived_state(struct r600_context *rctx)
|
||||||
* to LS slots and won't reflect what is dirty as VS stage even if the
|
* to LS slots and won't reflect what is dirty as VS stage even if the
|
||||||
* TES didn't overwrite it. The story for re-enabled TES is similar.
|
* TES didn't overwrite it. The story for re-enabled TES is similar.
|
||||||
* In any case, we're not allowed to submit any TES state when
|
* In any case, we're not allowed to submit any TES state when
|
||||||
* TES is disabled (the state tracker may not do this but this looks
|
* TES is disabled (the gallium frontend may not do this but this looks
|
||||||
* like an optimization to me, not something which can be relied on).
|
* like an optimization to me, not something which can be relied on).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -490,10 +490,10 @@ static void si_flush_from_st(struct pipe_context *ctx, struct pipe_fence_handle
|
||||||
ws->cs_sync_flush(sctx->gfx_cs);
|
ws->cs_sync_flush(sctx->gfx_cs);
|
||||||
} else {
|
} else {
|
||||||
/* Instead of flushing, create a deferred fence. Constraints:
|
/* Instead of flushing, create a deferred fence. Constraints:
|
||||||
* - The state tracker must allow a deferred flush.
|
* - the gallium frontend must allow a deferred flush.
|
||||||
* - The state tracker must request a fence.
|
* - the gallium frontend must request a fence.
|
||||||
* - fence_get_fd is not allowed.
|
* - fence_get_fd is not allowed.
|
||||||
* Thread safety in fence_finish must be ensured by the state tracker.
|
* Thread safety in fence_finish must be ensured by the gallium frontend.
|
||||||
*/
|
*/
|
||||||
if (flags & PIPE_FLUSH_DEFERRED && !(flags & PIPE_FLUSH_FENCE_FD) && fence) {
|
if (flags & PIPE_FLUSH_DEFERRED && !(flags & PIPE_FLUSH_FENCE_FD) && fence) {
|
||||||
gfx_fence = sctx->ws->cs_get_next_fence(sctx->gfx_cs);
|
gfx_fence = sctx->ws->cs_get_next_fence(sctx->gfx_cs);
|
||||||
|
|
|
@ -112,7 +112,7 @@ void si_flush_gfx_cs(struct si_context *ctx, unsigned flags, struct pipe_fence_h
|
||||||
|
|
||||||
ctx->gfx_flush_in_progress = true;
|
ctx->gfx_flush_in_progress = true;
|
||||||
|
|
||||||
/* If the state tracker is flushing the GFX IB, si_flush_from_st is
|
/* If the gallium frontend is flushing the GFX IB, si_flush_from_st is
|
||||||
* responsible for flushing the DMA IB and merging the fences from both.
|
* responsible for flushing the DMA IB and merging the fences from both.
|
||||||
* If the driver flushes the GFX IB internally, and it should never ask
|
* If the driver flushes the GFX IB internally, and it should never ask
|
||||||
* for a fence handle.
|
* for a fence handle.
|
||||||
|
|
|
@ -322,7 +322,7 @@ static enum pipe_reset_status si_get_reset_status(struct pipe_context *ctx)
|
||||||
enum pipe_reset_status status = sctx->ws->ctx_query_reset_status(sctx->ctx);
|
enum pipe_reset_status status = sctx->ws->ctx_query_reset_status(sctx->ctx);
|
||||||
|
|
||||||
if (status != PIPE_NO_RESET) {
|
if (status != PIPE_NO_RESET) {
|
||||||
/* Call the state tracker to set a no-op API dispatch. */
|
/* Call the gallium frontend to set a no-op API dispatch. */
|
||||||
if (sctx->device_reset_callback.reset) {
|
if (sctx->device_reset_callback.reset) {
|
||||||
sctx->device_reset_callback.reset(sctx->device_reset_callback.data, status);
|
sctx->device_reset_callback.reset(sctx->device_reset_callback.data, status);
|
||||||
}
|
}
|
||||||
|
|
|
@ -870,7 +870,7 @@ static void si_nir_lower_ps_inputs(struct nir_shader *nir)
|
||||||
|
|
||||||
void si_nir_adjust_driver_locations(struct nir_shader *nir)
|
void si_nir_adjust_driver_locations(struct nir_shader *nir)
|
||||||
{
|
{
|
||||||
/* Adjust the driver location of inputs and outputs. The state tracker
|
/* Adjust the driver location of inputs and outputs. the gallium frontend
|
||||||
* interprets them as slots, while the ac/nir backend interprets them
|
* interprets them as slots, while the ac/nir backend interprets them
|
||||||
* as individual components.
|
* as individual components.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4284,7 +4284,7 @@ struct pipe_sampler_view *si_create_sampler_view_custom(struct pipe_context *ctx
|
||||||
depth = u_minify(depth, force_level);
|
depth = u_minify(depth, force_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is not needed if state trackers set last_layer correctly. */
|
/* This is not needed if gallium frontends set last_layer correctly. */
|
||||||
if (state->target == PIPE_TEXTURE_1D || state->target == PIPE_TEXTURE_2D ||
|
if (state->target == PIPE_TEXTURE_1D || state->target == PIPE_TEXTURE_2D ||
|
||||||
state->target == PIPE_TEXTURE_RECT || state->target == PIPE_TEXTURE_CUBE)
|
state->target == PIPE_TEXTURE_RECT || state->target == PIPE_TEXTURE_CUBE)
|
||||||
last_layer = state->u.tex.first_layer;
|
last_layer = state->u.tex.first_layer;
|
||||||
|
@ -4554,7 +4554,7 @@ static void si_emit_sample_mask(struct si_context *sctx)
|
||||||
unsigned mask = sctx->sample_mask;
|
unsigned mask = sctx->sample_mask;
|
||||||
|
|
||||||
/* Needed for line and polygon smoothing as well as for the Polaris
|
/* Needed for line and polygon smoothing as well as for the Polaris
|
||||||
* small primitive filter. We expect the state tracker to take care of
|
* small primitive filter. We expect the gallium frontend to take care of
|
||||||
* this for us.
|
* this for us.
|
||||||
*/
|
*/
|
||||||
assert(mask == 0xffff || sctx->framebuffer.nr_samples > 1 ||
|
assert(mask == 0xffff || sctx->framebuffer.nr_samples > 1 ||
|
||||||
|
|
|
@ -1283,7 +1283,7 @@ struct pipe_resource *si_texture_create(struct pipe_screen *screen,
|
||||||
|
|
||||||
if (templ->nr_samples >= 2) {
|
if (templ->nr_samples >= 2) {
|
||||||
/* This is hackish (overwriting the const pipe_resource template),
|
/* This is hackish (overwriting the const pipe_resource template),
|
||||||
* but should be harmless and state trackers can also see
|
* but should be harmless and gallium frontends can also see
|
||||||
* the overriden number of samples in the created pipe_resource.
|
* the overriden number of samples in the created pipe_resource.
|
||||||
*/
|
*/
|
||||||
if (is_zs && sscreen->eqaa_force_z_samples) {
|
if (is_zs && sscreen->eqaa_force_z_samples) {
|
||||||
|
|
|
@ -132,7 +132,7 @@ struct softpipe_context {
|
||||||
/** Which vertex shader output slot contains layer */
|
/** Which vertex shader output slot contains layer */
|
||||||
int8_t layer_slot;
|
int8_t layer_slot;
|
||||||
|
|
||||||
/** The reduced version of the primitive supplied by the state tracker */
|
/** The reduced version of the primitive supplied by the gallium frontend */
|
||||||
unsigned reduced_api_prim;
|
unsigned reduced_api_prim;
|
||||||
|
|
||||||
/** Derived information about which winding orders to cull */
|
/** Derived information about which winding orders to cull */
|
||||||
|
|
|
@ -451,7 +451,7 @@ softpipe_is_format_supported( struct pipe_screen *screen,
|
||||||
/*
|
/*
|
||||||
* Although possible, it is unnatural to render into compressed or YUV
|
* Although possible, it is unnatural to render into compressed or YUV
|
||||||
* surfaces. So disable these here to avoid going into weird paths
|
* surfaces. So disable these here to avoid going into weird paths
|
||||||
* inside the state trackers.
|
* inside gallium frontends.
|
||||||
*/
|
*/
|
||||||
if (format_desc->block.width != 1 ||
|
if (format_desc->block.width != 1 ||
|
||||||
format_desc->block.height != 1)
|
format_desc->block.height != 1)
|
||||||
|
|
|
@ -428,7 +428,7 @@ update_polygon_stipple_enable(struct softpipe_context *softpipe, unsigned prim)
|
||||||
|
|
||||||
|
|
||||||
/* Hopefully this will remain quite simple, otherwise need to pull in
|
/* Hopefully this will remain quite simple, otherwise need to pull in
|
||||||
* something like the state tracker mechanism.
|
* something like the gallium frontend mechanism.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
softpipe_update_derived(struct softpipe_context *softpipe, unsigned prim)
|
softpipe_update_derived(struct softpipe_context *softpipe, unsigned prim)
|
||||||
|
|
|
@ -3599,7 +3599,7 @@ softpipe_create_sampler_view(struct pipe_context *pipe,
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
/*
|
/*
|
||||||
* This is possibly too lenient, but the primary reason is just
|
* This is possibly too lenient, but the primary reason is just
|
||||||
* to catch state trackers which forget to initialize this, so
|
* to catch gallium frontends which forget to initialize this, so
|
||||||
* it only catches clearly impossible view targets.
|
* it only catches clearly impossible view targets.
|
||||||
*/
|
*/
|
||||||
if (view->target != resource->target) {
|
if (view->target != resource->target) {
|
||||||
|
|
|
@ -452,7 +452,7 @@ struct svga_context
|
||||||
boolean no_line_width;
|
boolean no_line_width;
|
||||||
boolean force_hw_line_stipple;
|
boolean force_hw_line_stipple;
|
||||||
|
|
||||||
/** To report perf/conformance/etc issues to the state tracker */
|
/** To report perf/conformance/etc issues to the gallium frontend */
|
||||||
struct pipe_debug_callback callback;
|
struct pipe_debug_callback callback;
|
||||||
} debug;
|
} debug;
|
||||||
|
|
||||||
|
@ -507,7 +507,7 @@ struct svga_context
|
||||||
struct svga_hw_clear_state hw_clear;
|
struct svga_hw_clear_state hw_clear;
|
||||||
} state;
|
} state;
|
||||||
|
|
||||||
struct svga_state curr; /* state from the state tracker */
|
struct svga_state curr; /* state from the gallium frontend */
|
||||||
unsigned dirty; /* statechanges since last update_state() */
|
unsigned dirty; /* statechanges since last update_state() */
|
||||||
|
|
||||||
union {
|
union {
|
||||||
|
|
|
@ -382,7 +382,7 @@ can_blit_via_intra_surface_copy(struct svga_context *svga,
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The state tracker implements some resource copies with blits (for
|
* the gallium frontend implements some resource copies with blits (for
|
||||||
* GL_ARB_copy_image). This function checks if we should really do the blit
|
* GL_ARB_copy_image). This function checks if we should really do the blit
|
||||||
* with a VGPU10 CopyRegion command or software fallback (for incompatible
|
* with a VGPU10 CopyRegion command or software fallback (for incompatible
|
||||||
* src/dst formats).
|
* src/dst formats).
|
||||||
|
|
|
@ -208,7 +208,7 @@ svga_set_viewport_states(struct pipe_context *pipe,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called by state tracker to specify a callback function the driver
|
* Called by state tracker to specify a callback function the driver
|
||||||
* can use to report info back to the state tracker.
|
* can use to report info back to the gallium frontend.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
svga_set_debug_callback(struct pipe_context *pipe,
|
svga_set_debug_callback(struct pipe_context *pipe,
|
||||||
|
|
|
@ -62,7 +62,7 @@ svga_buffer_needs_hw_storage(const struct svga_screen *ss,
|
||||||
*/
|
*/
|
||||||
bind_mask |= PIPE_BIND_CUSTOM;
|
bind_mask |= PIPE_BIND_CUSTOM;
|
||||||
/* Uniform buffer objects.
|
/* Uniform buffer objects.
|
||||||
* Make sure we don't create hardware storage for state-tracker
|
* Make sure we don't create hardware storage for gallium frontend
|
||||||
* const0 buffers, because we frequently map them for reading.
|
* const0 buffers, because we frequently map them for reading.
|
||||||
* They are distinguished by having PIPE_USAGE_STREAM, but not
|
* They are distinguished by having PIPE_USAGE_STREAM, but not
|
||||||
* PIPE_BIND_CUSTOM.
|
* PIPE_BIND_CUSTOM.
|
||||||
|
@ -217,7 +217,7 @@ svga_buffer_transfer_map(struct pipe_context *pipe,
|
||||||
/*
|
/*
|
||||||
* We have a pending DMA upload from a hardware buffer, therefore
|
* We have a pending DMA upload from a hardware buffer, therefore
|
||||||
* we need to ensure that the host finishes processing that DMA
|
* we need to ensure that the host finishes processing that DMA
|
||||||
* command before the state tracker can start overwriting the
|
* command before the gallium frontend can start overwriting the
|
||||||
* hardware buffer.
|
* hardware buffer.
|
||||||
*
|
*
|
||||||
* XXX: This could be avoided by tying the hardware buffer to
|
* XXX: This could be avoided by tying the hardware buffer to
|
||||||
|
@ -464,7 +464,7 @@ svga_buffer_create(struct pipe_screen *screen,
|
||||||
/* If the buffer is not used for constant buffer, set
|
/* If the buffer is not used for constant buffer, set
|
||||||
* the vertex/index bind flags as well so that the buffer will be
|
* the vertex/index bind flags as well so that the buffer will be
|
||||||
* accepted for those uses.
|
* accepted for those uses.
|
||||||
* Note that the PIPE_BIND_ flags we get from the state tracker are
|
* Note that the PIPE_BIND_ flags we get from the gallium frontend are
|
||||||
* just a hint about how the buffer may be used. And OpenGL buffer
|
* just a hint about how the buffer may be used. And OpenGL buffer
|
||||||
* object may be used for many different things.
|
* object may be used for many different things.
|
||||||
* Also note that we do not unconditionally set the streamout
|
* Also note that we do not unconditionally set the streamout
|
||||||
|
|
|
@ -937,7 +937,7 @@ svga_texture_create(struct pipe_screen *screen,
|
||||||
|
|
||||||
/* Verify the number of mipmap levels isn't impossibly large. For example,
|
/* Verify the number of mipmap levels isn't impossibly large. For example,
|
||||||
* if the base 2D image is 16x16, we can't have 8 mipmap levels.
|
* if the base 2D image is 16x16, we can't have 8 mipmap levels.
|
||||||
* The state tracker should never ask us to create a resource with invalid
|
* the gallium frontend should never ask us to create a resource with invalid
|
||||||
* parameters.
|
* parameters.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
|
@ -1119,7 +1119,7 @@ svga_texture_create(struct pipe_screen *screen,
|
||||||
* and it always requests PIPE_BIND_RENDER_TARGET, therefore
|
* and it always requests PIPE_BIND_RENDER_TARGET, therefore
|
||||||
* passing the SVGA3D_SURFACE_HINT_RENDERTARGET here defeats its purpose.
|
* passing the SVGA3D_SURFACE_HINT_RENDERTARGET here defeats its purpose.
|
||||||
*
|
*
|
||||||
* However, this was changed since other state trackers
|
* However, this was changed since other gallium frontends
|
||||||
* (XA for example) uses it accurately and certain device versions
|
* (XA for example) uses it accurately and certain device versions
|
||||||
* relies on it in certain situations to render correctly.
|
* relies on it in certain situations to render correctly.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -534,8 +534,8 @@ vgpu9_get_shader_param(struct pipe_screen *screen,
|
||||||
/*
|
/*
|
||||||
* Although PS 3.0 has some addressing abilities it can only represent
|
* Although PS 3.0 has some addressing abilities it can only represent
|
||||||
* loops that can be statically determined and unrolled. Given we can
|
* loops that can be statically determined and unrolled. Given we can
|
||||||
* only handle a subset of the cases that the state tracker already
|
* only handle a subset of the cases that the gallium frontend already
|
||||||
* does it is better to defer loop unrolling to the state tracker.
|
* does it is better to defer loop unrolling to the gallium frontend.
|
||||||
*/
|
*/
|
||||||
return 0;
|
return 0;
|
||||||
case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
|
case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
|
||||||
|
|
|
@ -449,7 +449,7 @@ struct svga_winsys_context
|
||||||
struct svga_winsys_gb_shader *shader,
|
struct svga_winsys_gb_shader *shader,
|
||||||
unsigned flags);
|
unsigned flags);
|
||||||
|
|
||||||
/** To report perf/conformance/etc issues to the state tracker */
|
/** To report perf/conformance/etc issues to the gallium frontend */
|
||||||
struct pipe_debug_callback *debug_callback;
|
struct pipe_debug_callback *debug_callback;
|
||||||
|
|
||||||
/** The more recent command issued to command buffer */
|
/** The more recent command issued to command buffer */
|
||||||
|
|
|
@ -127,7 +127,7 @@ swr_is_format_supported(struct pipe_screen *_screen,
|
||||||
/*
|
/*
|
||||||
* Although possible, it is unnatural to render into compressed or YUV
|
* Although possible, it is unnatural to render into compressed or YUV
|
||||||
* surfaces. So disable these here to avoid going into weird paths
|
* surfaces. So disable these here to avoid going into weird paths
|
||||||
* inside the state trackers.
|
* inside gallium frontends.
|
||||||
*/
|
*/
|
||||||
if (format_desc->block.width != 1 || format_desc->block.height != 1)
|
if (format_desc->block.width != 1 || format_desc->block.height != 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -453,7 +453,7 @@ v3d_set_constant_buffer(struct pipe_context *pctx, uint shader, uint index,
|
||||||
|
|
||||||
util_copy_constant_buffer(&so->cb[index], cb);
|
util_copy_constant_buffer(&so->cb[index], cb);
|
||||||
|
|
||||||
/* Note that the state tracker can unbind constant buffers by
|
/* Note that the gallium frontend can unbind constant buffers by
|
||||||
* passing NULL here.
|
* passing NULL here.
|
||||||
*/
|
*/
|
||||||
if (unlikely(!cb)) {
|
if (unlikely(!cb)) {
|
||||||
|
|
|
@ -387,7 +387,7 @@ vc4_set_constant_buffer(struct pipe_context *pctx,
|
||||||
struct vc4_context *vc4 = vc4_context(pctx);
|
struct vc4_context *vc4 = vc4_context(pctx);
|
||||||
struct vc4_constbuf_stateobj *so = &vc4->constbuf[shader];
|
struct vc4_constbuf_stateobj *so = &vc4->constbuf[shader];
|
||||||
|
|
||||||
/* Note that the state tracker can unbind constant buffers by
|
/* Note that the gallium frontend can unbind constant buffers by
|
||||||
* passing NULL here.
|
* passing NULL here.
|
||||||
*/
|
*/
|
||||||
if (unlikely(!cb)) {
|
if (unlikely(!cb)) {
|
||||||
|
|
|
@ -725,7 +725,7 @@ virgl_is_format_supported( struct pipe_screen *screen,
|
||||||
/*
|
/*
|
||||||
* Although possible, it is unnatural to render into compressed or YUV
|
* Although possible, it is unnatural to render into compressed or YUV
|
||||||
* surfaces. So disable these here to avoid going into weird paths
|
* surfaces. So disable these here to avoid going into weird paths
|
||||||
* inside the state trackers.
|
* inside gallium frontends.
|
||||||
*/
|
*/
|
||||||
if (format_desc->block.width != 1 ||
|
if (format_desc->block.width != 1 ||
|
||||||
format_desc->block.height != 1)
|
format_desc->block.height != 1)
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include "util/macros.h"
|
#include "util/macros.h"
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Main namespace of the CL state tracker.
|
/// Main namespace of the CL gallium frontend.
|
||||||
///
|
///
|
||||||
namespace clover {
|
namespace clover {
|
||||||
///
|
///
|
||||||
|
|
|
@ -594,10 +594,10 @@ dri2_allocate_textures(struct dri_context *ctx,
|
||||||
* such that they contain the same data as the single-sample
|
* such that they contain the same data as the single-sample
|
||||||
* resources we just got from the X server.
|
* resources we just got from the X server.
|
||||||
*
|
*
|
||||||
* The reason for this is that the state tracker (and
|
* The reason for this is that the gallium frontend (and
|
||||||
* therefore the app) can access the MSAA resources only.
|
* therefore the app) can access the MSAA resources only.
|
||||||
* The single-sample resources are not exposed
|
* The single-sample resources are not exposed
|
||||||
* to the state tracker.
|
* to the gallium frontend.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
dri_pipe_blit(ctx->st->pipe,
|
dri_pipe_blit(ctx->st->pipe,
|
||||||
|
@ -748,7 +748,7 @@ dri2_create_image_from_winsys(__DRIscreen *_screen,
|
||||||
tex_usage |= PIPE_BIND_SAMPLER_VIEW;
|
tex_usage |= PIPE_BIND_SAMPLER_VIEW;
|
||||||
|
|
||||||
if (!tex_usage && util_format_is_yuv(map->pipe_format)) {
|
if (!tex_usage && util_format_is_yuv(map->pipe_format)) {
|
||||||
/* YUV format sampling can be emulated by the Mesa state tracker by
|
/* YUV format sampling can be emulated by the GL gallium frontend by
|
||||||
* using multiple samplers of varying formats.
|
* using multiple samplers of varying formats.
|
||||||
* If no tex_usage is set and we detect a YUV format,
|
* If no tex_usage is set and we detect a YUV format,
|
||||||
* test for support of all planes' sampler formats and
|
* test for support of all planes' sampler formats and
|
||||||
|
|
|
@ -107,7 +107,7 @@ dri_st_framebuffer_validate(struct st_context_iface *stctx,
|
||||||
if (!out)
|
if (!out)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* Set the window-system buffers for the state tracker. */
|
/* Set the window-system buffers for the gallium frontend. */
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
pipe_resource_reference(&out[i], textures[statts[i]]);
|
pipe_resource_reference(&out[i], textures[statts[i]]);
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ dri_st_framebuffer_flush_front(struct st_context_iface *stctx,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The state tracker framebuffer interface flush_swapbuffers callback
|
* The gallium frontend framebuffer interface flush_swapbuffers callback
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
dri_st_framebuffer_flush_swapbuffers(struct st_context_iface *stctx,
|
dri_st_framebuffer_flush_swapbuffers(struct st_context_iface *stctx,
|
||||||
|
@ -552,8 +552,8 @@ dri_flush(__DRIcontext *cPriv,
|
||||||
drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT];
|
drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT];
|
||||||
drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT] = tmp;
|
drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT] = tmp;
|
||||||
|
|
||||||
/* Now that we have swapped the buffers, this tells the state
|
/* Now that we have swapped the buffers, this tells the gallium
|
||||||
* tracker to revalidate the framebuffer.
|
* frontend to revalidate the framebuffer.
|
||||||
*/
|
*/
|
||||||
p_atomic_inc(&drawable->base.stamp);
|
p_atomic_inc(&drawable->base.stamp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -451,7 +451,7 @@ dri_fill_st_visual(struct st_visual *stvis,
|
||||||
|
|
||||||
if (mode->depthBits > 0 || mode->stencilBits > 0)
|
if (mode->depthBits > 0 || mode->stencilBits > 0)
|
||||||
stvis->buffer_mask |= ST_ATTACHMENT_DEPTH_STENCIL_MASK;
|
stvis->buffer_mask |= ST_ATTACHMENT_DEPTH_STENCIL_MASK;
|
||||||
/* let the state tracker allocate the accum buffer */
|
/* let the gallium frontend allocate the accum buffer */
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
struct pipe_screen;
|
struct pipe_screen;
|
||||||
struct st_api;
|
struct st_api;
|
||||||
|
|
||||||
/* This is the driver interface required by the glx/xlib state tracker.
|
/* This is the driver interface required by the glx/xlib frontends.
|
||||||
*/
|
*/
|
||||||
struct xm_driver {
|
struct xm_driver {
|
||||||
struct pipe_screen *(*create_pipe_screen)( Display *display );
|
struct pipe_screen *(*create_pipe_screen)( Display *display );
|
||||||
|
|
|
@ -55,13 +55,13 @@ struct hgl_buffer
|
||||||
struct hgl_context
|
struct hgl_context
|
||||||
{
|
{
|
||||||
struct st_api* api;
|
struct st_api* api;
|
||||||
// State Tracker API
|
// API
|
||||||
struct st_manager* manager;
|
struct st_manager* manager;
|
||||||
// State Tracker Manager
|
// Manager
|
||||||
struct st_context_iface* st;
|
struct st_context_iface* st;
|
||||||
// State Tracker Interface Object
|
// Interface Object
|
||||||
struct st_visual* stVisual;
|
struct st_visual* stVisual;
|
||||||
// State Tracker Visual
|
// Visual
|
||||||
|
|
||||||
struct pipe_screen* screen;
|
struct pipe_screen* screen;
|
||||||
|
|
||||||
|
|
|
@ -453,7 +453,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This,
|
||||||
return D3D_OK;
|
return D3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Throttling: code adapted from the dri state tracker */
|
/* Throttling: code adapted from the dri frontend */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* swap_fences_pop_front - pull a fence from the throttle queue
|
* swap_fences_pop_front - pull a fence from the throttle queue
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Off-Screen rendering into client memory.
|
* Off-Screen rendering into client memory.
|
||||||
* State tracker for gallium (for softpipe and llvmpipe)
|
* OpenGL gallium frontend for softpipe and llvmpipe.
|
||||||
*
|
*
|
||||||
* Notes:
|
* Notes:
|
||||||
*
|
*
|
||||||
|
|
|
@ -461,7 +461,7 @@ vlVdpVideoSurfaceClear(vlVdpSurface *vlsurf)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interop to mesa state tracker
|
* Interop for the GL gallium frontend
|
||||||
*/
|
*/
|
||||||
struct pipe_video_buffer *vlVdpVideoSurfaceGallium(VdpVideoSurface surface)
|
struct pipe_video_buffer *vlVdpVideoSurfaceGallium(VdpVideoSurface surface)
|
||||||
{
|
{
|
||||||
|
|
|
@ -546,7 +546,7 @@ VdpGenerateCSCMatrix vlVdpGenerateCSCMatrix;
|
||||||
VdpPresentationQueueTargetCreateX11 vlVdpPresentationQueueTargetCreateX11;
|
VdpPresentationQueueTargetCreateX11 vlVdpPresentationQueueTargetCreateX11;
|
||||||
|
|
||||||
|
|
||||||
/* interop to mesa state tracker */
|
/* interop for GL gallium frontend */
|
||||||
VdpVideoSurfaceGallium vlVdpVideoSurfaceGallium;
|
VdpVideoSurfaceGallium vlVdpVideoSurfaceGallium;
|
||||||
VdpOutputSurfaceGallium vlVdpOutputSurfaceGallium;
|
VdpOutputSurfaceGallium vlVdpOutputSurfaceGallium;
|
||||||
VdpVideoSurfaceDMABuf vlVdpVideoSurfaceDMABuf;
|
VdpVideoSurfaceDMABuf vlVdpVideoSurfaceDMABuf;
|
||||||
|
|
|
@ -190,7 +190,7 @@ stw_pixelformat_add(struct stw_device *stw_dev,
|
||||||
pfi->pfd.dwDamageMask = 0;
|
pfi->pfd.dwDamageMask = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* since state trackers can allocate depth/stencil/accum buffers, we provide
|
* since gallium frontend can allocate depth/stencil/accum buffers, we provide
|
||||||
* only color buffers here
|
* only color buffers here
|
||||||
*/
|
*/
|
||||||
pfi->stvis.buffer_mask = ST_ATTACHMENT_FRONT_LEFT_MASK;
|
pfi->stvis.buffer_mask = ST_ATTACHMENT_FRONT_LEFT_MASK;
|
||||||
|
|
|
@ -385,7 +385,7 @@ stw_get_framebuffer_resource(struct st_framebuffer_iface *stfb,
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an st_api of the state tracker.
|
* Create an st_api of the gallium frontend.
|
||||||
*/
|
*/
|
||||||
struct st_api *
|
struct st_api *
|
||||||
stw_st_create_api(void)
|
stw_st_create_api(void)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
*
|
*
|
||||||
* Fake WGL API implementation.
|
* Fake WGL gallium frontend.
|
||||||
*
|
*
|
||||||
* These functions implement the WGL API, on top of the ICD DDI, so that the
|
* These functions implement the WGL API, on top of the ICD DDI, so that the
|
||||||
* resulting DLL can be used as a drop-in replacement for the system's
|
* resulting DLL can be used as a drop-in replacement for the system's
|
||||||
|
|
|
@ -30,19 +30,15 @@
|
||||||
#include "pipe/p_format.h"
|
#include "pipe/p_format.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file API for communication between state trackers and state tracker
|
* \file API for communication between gallium frontends and supporting
|
||||||
* managers.
|
* frontends such as DRI.
|
||||||
*
|
*
|
||||||
* While both are state tackers, we use the term state tracker for rendering
|
* This file defines an API to be implemented by both gallium frontends and
|
||||||
* APIs such as OpenGL or OpenVG, and state tracker manager for window system
|
* their managers.
|
||||||
* APIs such as EGL or GLX in this file.
|
|
||||||
*
|
|
||||||
* This file defines an API to be implemented by both state trackers and state
|
|
||||||
* tracker managers.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The supported rendering API of a state tracker.
|
* The supported rendering API.
|
||||||
*/
|
*/
|
||||||
enum st_api_type {
|
enum st_api_type {
|
||||||
ST_API_OPENGL,
|
ST_API_OPENGL,
|
||||||
|
@ -69,7 +65,7 @@ enum st_profile_type
|
||||||
#define ST_PROFILE_OPENGL_ES2_MASK (1 << ST_PROFILE_OPENGL_ES2)
|
#define ST_PROFILE_OPENGL_ES2_MASK (1 << ST_PROFILE_OPENGL_ES2)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional API/state tracker features.
|
* Optional API features.
|
||||||
*/
|
*/
|
||||||
enum st_api_feature
|
enum st_api_feature
|
||||||
{
|
{
|
||||||
|
@ -155,10 +151,10 @@ enum st_attachment_type {
|
||||||
*/
|
*/
|
||||||
enum st_manager_param {
|
enum st_manager_param {
|
||||||
/**
|
/**
|
||||||
* The dri state tracker on old libGL's doesn't do the right thing
|
* The DRI frontend on old libGL's doesn't do the right thing
|
||||||
* with regards to invalidating the framebuffers.
|
* with regards to invalidating the framebuffers.
|
||||||
*
|
*
|
||||||
* For the mesa state tracker that means that it needs to invalidate
|
* For the GL gallium frontend that means that it needs to invalidate
|
||||||
* the framebuffer in glViewport itself.
|
* the framebuffer in glViewport itself.
|
||||||
*/
|
*/
|
||||||
ST_MANAGER_BROKEN_INVALIDATE
|
ST_MANAGER_BROKEN_INVALIDATE
|
||||||
|
@ -274,11 +270,11 @@ struct st_manager;
|
||||||
/**
|
/**
|
||||||
* Represent a windowing system drawable.
|
* Represent a windowing system drawable.
|
||||||
*
|
*
|
||||||
* The framebuffer is implemented by the state tracker manager and
|
* The framebuffer is implemented by the frontend manager and
|
||||||
* used by the state trackers.
|
* used by gallium frontends.
|
||||||
*
|
*
|
||||||
* Instead of the winsys poking into the API context to figure
|
* Instead of the winsys poking into the frontend context to figure
|
||||||
* out what buffers that might be needed in the future by the API
|
* out what buffers that might be needed in the future by the frontend
|
||||||
* context, it calls into the framebuffer to get the textures.
|
* context, it calls into the framebuffer to get the textures.
|
||||||
*
|
*
|
||||||
* This structure along with the notify_invalid_framebuffer
|
* This structure along with the notify_invalid_framebuffer
|
||||||
|
@ -303,12 +299,12 @@ struct st_framebuffer_iface
|
||||||
uint32_t ID;
|
uint32_t ID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The state tracker manager that manages this object.
|
* The frontend manager that manages this object.
|
||||||
*/
|
*/
|
||||||
struct st_manager *state_manager;
|
struct st_manager *state_manager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Available for the state tracker manager to use.
|
* Available for the frontend manager to use.
|
||||||
*/
|
*/
|
||||||
void *st_manager_private;
|
void *st_manager_private;
|
||||||
|
|
||||||
|
@ -330,7 +326,7 @@ struct st_framebuffer_iface
|
||||||
enum st_attachment_type statt);
|
enum st_attachment_type statt);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The state tracker asks for the textures it needs.
|
* the gallium frontend asks for the textures it needs.
|
||||||
*
|
*
|
||||||
* It should try to only ask for attachments that it currently renders
|
* It should try to only ask for attachments that it currently renders
|
||||||
* to, thus allowing the winsys to delay the allocation of textures not
|
* to, thus allowing the winsys to delay the allocation of textures not
|
||||||
|
@ -358,18 +354,18 @@ struct st_framebuffer_iface
|
||||||
/**
|
/**
|
||||||
* Represent a rendering context.
|
* Represent a rendering context.
|
||||||
*
|
*
|
||||||
* This entity is created from st_api and used by the state tracker manager.
|
* This entity is created from st_api and used by the frontend manager.
|
||||||
*/
|
*/
|
||||||
struct st_context_iface
|
struct st_context_iface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Available for the state tracker and the manager to use.
|
* Available for the gallium frontend and the manager to use.
|
||||||
*/
|
*/
|
||||||
void *st_context_private;
|
void *st_context_private;
|
||||||
void *st_manager_private;
|
void *st_manager_private;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The state tracker manager that manages this object.
|
* The frontend manager that manages this object.
|
||||||
*/
|
*/
|
||||||
struct st_manager *state_manager;
|
struct st_manager *state_manager;
|
||||||
|
|
||||||
|
@ -435,9 +431,9 @@ struct st_context_iface
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represent a state tracker manager.
|
* Represent a frontend manager.
|
||||||
*
|
*
|
||||||
* This interface is implemented by the state tracker manager. It corresponds
|
* This interface is implemented by the frontend manager. It corresponds
|
||||||
* to a "display" in the window system.
|
* to a "display" in the window system.
|
||||||
*/
|
*/
|
||||||
struct st_manager
|
struct st_manager
|
||||||
|
@ -477,12 +473,12 @@ struct st_manager
|
||||||
struct util_queue_monitoring *queue_info);
|
struct util_queue_monitoring *queue_info);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy any private data used by the state tracker manager.
|
* Destroy any private data used by the frontend manager.
|
||||||
*/
|
*/
|
||||||
void (*destroy)(struct st_manager *smapi);
|
void (*destroy)(struct st_manager *smapi);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Available for the state tracker manager to use.
|
* Available for the frontend manager to use.
|
||||||
*/
|
*/
|
||||||
void *st_manager_private;
|
void *st_manager_private;
|
||||||
};
|
};
|
||||||
|
@ -490,7 +486,7 @@ struct st_manager
|
||||||
/**
|
/**
|
||||||
* Represent a rendering API such as OpenGL or OpenVG.
|
* Represent a rendering API such as OpenGL or OpenVG.
|
||||||
*
|
*
|
||||||
* Implemented by the state tracker and used by the state tracker manager.
|
* Implemented by the gallium frontend and used by the frontend manager.
|
||||||
*/
|
*/
|
||||||
struct st_api
|
struct st_api
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
/* This is what the xlib software winsys expects to find in the
|
/* This is what the xlib software winsys expects to find in the
|
||||||
* "private" field of flush_frontbuffers().
|
* "private" field of flush_frontbuffers().
|
||||||
*
|
*
|
||||||
* Xlib-based state trackers somehow need to know this.
|
* Xlib-based gallium frontends somehow need to know this.
|
||||||
*/
|
*/
|
||||||
struct xlib_drawable {
|
struct xlib_drawable {
|
||||||
Visual *visual;
|
Visual *visual;
|
||||||
|
|
|
@ -91,7 +91,7 @@ struct pipe_context {
|
||||||
void *draw; /**< private, for draw module (temporary?) */
|
void *draw; /**< private, for draw module (temporary?) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stream uploaders created by the driver. All drivers, state trackers, and
|
* Stream uploaders created by the driver. All drivers, gallium frontends, and
|
||||||
* modules should use them.
|
* modules should use them.
|
||||||
*
|
*
|
||||||
* Use u_upload_alloc or u_upload_data as many times as you want.
|
* Use u_upload_alloc or u_upload_data as many times as you want.
|
||||||
|
|
|
@ -255,10 +255,10 @@ enum pipe_transfer_usage
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The transfer should map the texture storage directly. The driver may
|
* The transfer should map the texture storage directly. The driver may
|
||||||
* return NULL if that isn't possible, and the state tracker needs to cope
|
* return NULL if that isn't possible, and the gallium frontend needs to cope
|
||||||
* with that and use an alternative path without this flag.
|
* with that and use an alternative path without this flag.
|
||||||
*
|
*
|
||||||
* E.g. the state tracker could have a simpler path which maps textures and
|
* E.g. the gallium frontend could have a simpler path which maps textures and
|
||||||
* does read/modify/write cycles on them directly, and a more complicated
|
* does read/modify/write cycles on them directly, and a more complicated
|
||||||
* path which uses minimal read and write transfers.
|
* path which uses minimal read and write transfers.
|
||||||
*
|
*
|
||||||
|
@ -448,7 +448,7 @@ enum pipe_flush_flags
|
||||||
#define PIPE_TEXTURE_BARRIER_FRAMEBUFFER (1 << 1)
|
#define PIPE_TEXTURE_BARRIER_FRAMEBUFFER (1 << 1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resource binding flags -- state tracker must specify in advance all
|
* Resource binding flags -- gallium frontends must specify in advance all
|
||||||
* the ways a resource might be used.
|
* the ways a resource might be used.
|
||||||
*/
|
*/
|
||||||
#define PIPE_BIND_DEPTH_STENCIL (1 << 0) /* create_surface */
|
#define PIPE_BIND_DEPTH_STENCIL (1 << 0) /* create_surface */
|
||||||
|
@ -462,7 +462,7 @@ enum pipe_flush_flags
|
||||||
/* gap */
|
/* gap */
|
||||||
#define PIPE_BIND_STREAM_OUTPUT (1 << 10) /* set_stream_output_buffers */
|
#define PIPE_BIND_STREAM_OUTPUT (1 << 10) /* set_stream_output_buffers */
|
||||||
#define PIPE_BIND_CURSOR (1 << 11) /* mouse cursor */
|
#define PIPE_BIND_CURSOR (1 << 11) /* mouse cursor */
|
||||||
#define PIPE_BIND_CUSTOM (1 << 12) /* state-tracker/winsys usages */
|
#define PIPE_BIND_CUSTOM (1 << 12) /* gallium frontend/winsys usages */
|
||||||
#define PIPE_BIND_GLOBAL (1 << 13) /* set_global_binding */
|
#define PIPE_BIND_GLOBAL (1 << 13) /* set_global_binding */
|
||||||
#define PIPE_BIND_SHADER_BUFFER (1 << 14) /* set_shader_buffers */
|
#define PIPE_BIND_SHADER_BUFFER (1 << 14) /* set_shader_buffers */
|
||||||
#define PIPE_BIND_SHADER_IMAGE (1 << 15) /* set_shader_images */
|
#define PIPE_BIND_SHADER_IMAGE (1 << 15) /* set_shader_images */
|
||||||
|
@ -477,10 +477,9 @@ enum pipe_flush_flags
|
||||||
* below do not fit within that and probably need to be migrated to some
|
* below do not fit within that and probably need to be migrated to some
|
||||||
* other place.
|
* other place.
|
||||||
*
|
*
|
||||||
* It seems like scanout is used by the Xorg state tracker to ask for
|
* Scanout is used to ask for a texture suitable for actual scanout (hence
|
||||||
* a texture suitable for actual scanout (hence the name), which
|
* the name), which implies extra layout constraints on some hardware.
|
||||||
* implies extra layout constraints on some hardware. It may also
|
* It may also have some special meaning regarding mouse cursor images.
|
||||||
* have some special meaning regarding mouse cursor images.
|
|
||||||
*
|
*
|
||||||
* The shared flag is quite underspecified, but certainly isn't a
|
* The shared flag is quite underspecified, but certainly isn't a
|
||||||
* binding flag - it seems more like a message to the winsys to create
|
* binding flag - it seems more like a message to the winsys to create
|
||||||
|
@ -504,7 +503,7 @@ enum pipe_flush_flags
|
||||||
#define PIPE_RESOURCE_FLAG_SINGLE_THREAD_USE (1 << 4)
|
#define PIPE_RESOURCE_FLAG_SINGLE_THREAD_USE (1 << 4)
|
||||||
#define PIPE_RESOURCE_FLAG_ENCRYPTED (1 << 5)
|
#define PIPE_RESOURCE_FLAG_ENCRYPTED (1 << 5)
|
||||||
#define PIPE_RESOURCE_FLAG_DRV_PRIV (1 << 8) /* driver/winsys private */
|
#define PIPE_RESOURCE_FLAG_DRV_PRIV (1 << 8) /* driver/winsys private */
|
||||||
#define PIPE_RESOURCE_FLAG_ST_PRIV (1 << 24) /* state-tracker/winsys private */
|
#define PIPE_RESOURCE_FLAG_ST_PRIV (1 << 24) /* gallium frontend/winsys private */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hint about the expected lifecycle of a resource.
|
* Hint about the expected lifecycle of a resource.
|
||||||
|
@ -1044,7 +1043,7 @@ enum pipe_shader_cap
|
||||||
* get TGSI.
|
* get TGSI.
|
||||||
*
|
*
|
||||||
* Note that PIPE_SHADER_IR_TGSI should be zero for backwards compat with
|
* Note that PIPE_SHADER_IR_TGSI should be zero for backwards compat with
|
||||||
* state trackers that only understand TGSI.
|
* gallium frontends that only understand TGSI.
|
||||||
*/
|
*/
|
||||||
enum pipe_shader_ir
|
enum pipe_shader_ir
|
||||||
{
|
{
|
||||||
|
|
|
@ -223,7 +223,7 @@ struct pipe_screen {
|
||||||
void *user_memory);
|
void *user_memory);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unlike pipe_resource::bind, which describes what state trackers want,
|
* Unlike pipe_resource::bind, which describes what gallium frontends want,
|
||||||
* resources can have much greater capabilities in practice, often implied
|
* resources can have much greater capabilities in practice, often implied
|
||||||
* by the tiling layout or memory placement. This function allows querying
|
* by the tiling layout or memory placement. This function allows querying
|
||||||
* whether a capability is supported beyond what was requested by state
|
* whether a capability is supported beyond what was requested by state
|
||||||
|
@ -504,7 +504,7 @@ struct pipe_screen {
|
||||||
/**
|
/**
|
||||||
* Run driver-specific NIR lowering and optimization passes.
|
* Run driver-specific NIR lowering and optimization passes.
|
||||||
*
|
*
|
||||||
* State trackers should call this before passing shaders to drivers,
|
* gallium frontends should call this before passing shaders to drivers,
|
||||||
* and ideally also before shader caching.
|
* and ideally also before shader caching.
|
||||||
*
|
*
|
||||||
* \param optimize Whether the input shader hasn't been optimized and
|
* \param optimize Whether the input shader hasn't been optimized and
|
||||||
|
|
|
@ -276,7 +276,7 @@ struct pipe_stream_output_info
|
||||||
*
|
*
|
||||||
* NOTE: since it is expected that the consumer will want to perform
|
* NOTE: since it is expected that the consumer will want to perform
|
||||||
* additional passes on the nir_shader, the driver takes ownership of
|
* additional passes on the nir_shader, the driver takes ownership of
|
||||||
* the nir_shader. If state trackers need to hang on to the IR (for
|
* the nir_shader. If gallium frontends need to hang on to the IR (for
|
||||||
* example, variant management), it should use nir_shader_clone().
|
* example, variant management), it should use nir_shader_clone().
|
||||||
*/
|
*/
|
||||||
struct pipe_shader_state
|
struct pipe_shader_state
|
||||||
|
@ -904,7 +904,7 @@ struct pipe_compute_state
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structure that contains a callback for debug messages from the driver back
|
* Structure that contains a callback for debug messages from the driver back
|
||||||
* to the state tracker.
|
* to the gallium frontend.
|
||||||
*/
|
*/
|
||||||
struct pipe_debug_callback
|
struct pipe_debug_callback
|
||||||
{
|
{
|
||||||
|
@ -916,7 +916,7 @@ struct pipe_debug_callback
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback for the driver to report debug/performance/etc information back
|
* Callback for the driver to report debug/performance/etc information back
|
||||||
* to the state tracker.
|
* to the gallium frontend.
|
||||||
*
|
*
|
||||||
* \param data user-supplied data pointer
|
* \param data user-supplied data pointer
|
||||||
* \param id message type identifier, if pointed value is 0, then a
|
* \param id message type identifier, if pointed value is 0, then a
|
||||||
|
@ -935,7 +935,7 @@ struct pipe_debug_callback
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structure that contains a callback for device reset messages from the driver
|
* Structure that contains a callback for device reset messages from the driver
|
||||||
* back to the state tracker.
|
* back to the gallium frontend.
|
||||||
*
|
*
|
||||||
* The callback must not be called from driver-created threads.
|
* The callback must not be called from driver-created threads.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -104,7 +104,7 @@ struct pipe_video_codec
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* flush any outstanding command buffers to the hardware
|
* flush any outstanding command buffers to the hardware
|
||||||
* should be called before a video_buffer is acessed by the state tracker again
|
* should be called before a video_buffer is acessed by the gallium frontend again
|
||||||
*/
|
*/
|
||||||
void (*flush)(struct pipe_video_codec *codec);
|
void (*flush)(struct pipe_video_codec *codec);
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ gdi_present(struct pipe_screen *screen,
|
||||||
HDC hDC)
|
HDC hDC)
|
||||||
{
|
{
|
||||||
/* This will fail if any interposing layer (trace, debug, etc) has
|
/* This will fail if any interposing layer (trace, debug, etc) has
|
||||||
* been introduced between the state-trackers and the pipe driver.
|
* been introduced between the gallium frontends and the pipe driver.
|
||||||
*
|
*
|
||||||
* Ideally this would get replaced with a call to
|
* Ideally this would get replaced with a call to
|
||||||
* pipe_screen::flush_frontbuffer().
|
* pipe_screen::flush_frontbuffer().
|
||||||
|
|
|
@ -2,7 +2,7 @@ These directory contains tools for manipulating traces produced by the trace
|
||||||
pipe driver.
|
pipe driver.
|
||||||
|
|
||||||
|
|
||||||
Most debug builds of state trackers already load the trace driver by default.
|
Most debug builds of gallium frontends already load the trace driver by default.
|
||||||
To produce a trace do
|
To produce a trace do
|
||||||
|
|
||||||
export GALLIUM_TRACE=foo.gtrace
|
export GALLIUM_TRACE=foo.gtrace
|
||||||
|
@ -34,6 +34,6 @@ You can compare two JSON files by doing
|
||||||
|
|
||||||
./diff_state.py foo.json boo.json | less
|
./diff_state.py foo.json boo.json | less
|
||||||
|
|
||||||
If you're investigating a regression in a state tracker, you can obtain a good
|
If you're investigating a regression in an gallium frontend, you can obtain a good
|
||||||
and bad trace, dump respective state in JSON, and then compare the states to
|
and bad trace, dump respective state in JSON, and then compare the states to
|
||||||
identify the problem.
|
identify the problem.
|
||||||
|
|
|
@ -45,8 +45,8 @@ static void st_viewport(struct gl_context *ctx)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Normally we'd want the state tracker manager to mark the drawables
|
* Normally we'd want the frontend manager to mark the drawables
|
||||||
* invalid only when needed. This will force the state tracker manager
|
* invalid only when needed. This will force the frontend manager
|
||||||
* to revalidate the drawable, rather than just update the context with
|
* to revalidate the drawable, rather than just update the context with
|
||||||
* the latest cached drawable info.
|
* the latest cached drawable info.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1248,7 +1248,7 @@ st_manager_add_color_renderbuffer(struct st_context *st,
|
||||||
st_framebuffer_update_attachments(stfb);
|
st_framebuffer_update_attachments(stfb);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Force a call to the state tracker manager to validate the
|
* Force a call to the frontend manager to validate the
|
||||||
* new renderbuffer. It might be that there is a window system
|
* new renderbuffer. It might be that there is a window system
|
||||||
* renderbuffer available.
|
* renderbuffer available.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -94,7 +94,7 @@ panfrost_format_supports_afbc(enum pipe_format format)
|
||||||
|
|
||||||
/* Z32/Z16/S8 are all compressible as well, but they are implemented as
|
/* Z32/Z16/S8 are all compressible as well, but they are implemented as
|
||||||
* Z24S8 with wasted bits. So Z24S8 is the only format we actually need
|
* Z24S8 with wasted bits. So Z24S8 is the only format we actually need
|
||||||
* to handle compressed, and we can make the state tracker deal with
|
* to handle compressed, and we can make the gallium frontend deal with
|
||||||
* the rest. */
|
* the rest. */
|
||||||
|
|
||||||
if (format == PIPE_FORMAT_Z24_UNORM_S8_UINT)
|
if (format == PIPE_FORMAT_Z24_UNORM_S8_UINT)
|
||||||
|
|
|
@ -25,7 +25,7 @@ usage: merge_driinfo.py <list of input files>
|
||||||
|
|
||||||
Generates a source file which contains the DRI_CONF_xxx macros for generating
|
Generates a source file which contains the DRI_CONF_xxx macros for generating
|
||||||
the driinfo XML that describes the available DriConf options for a driver and
|
the driinfo XML that describes the available DriConf options for a driver and
|
||||||
its supported state trackers, based on the merged information from the input
|
its supported gallium frontends, based on the merged information from the input
|
||||||
files.
|
files.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue