[Mesa-dev] [PATCH 1/2] gallium: add PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET
Dieter Nützel
Dieter at nuetzel-hh.de
Wed Sep 5 00:16:24 UTC 2018
Hello Marek,
can you resend?
I want the texture upload speed up...
Dieter
Am 01.09.2018 03:02, schrieb Marek Olšák:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
> src/gallium/docs/source/screen.rst | 3 +++
> src/gallium/drivers/etnaviv/etnaviv_screen.c | 1 +
> src/gallium/drivers/freedreno/freedreno_screen.c | 1 +
> src/gallium/drivers/i915/i915_screen.c | 1 +
> src/gallium/drivers/llvmpipe/lp_screen.c | 1 +
> src/gallium/drivers/nouveau/nv30/nv30_screen.c | 1 +
> src/gallium/drivers/nouveau/nv50/nv50_screen.c | 1 +
> src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 1 +
> src/gallium/drivers/r300/r300_screen.c | 1 +
> src/gallium/drivers/r600/r600_pipe.c | 4 ++++
> src/gallium/drivers/radeonsi/si_get.c | 4 ++++
> src/gallium/drivers/softpipe/sp_screen.c | 1 +
> src/gallium/drivers/svga/svga_screen.c | 1 +
> src/gallium/drivers/swr/swr_screen.cpp | 1 +
> src/gallium/drivers/v3d/v3d_screen.c | 1 +
> src/gallium/drivers/vc4/vc4_screen.c | 1 +
> src/gallium/drivers/virgl/virgl_screen.c | 1 +
> src/gallium/include/pipe/p_defines.h | 1 +
> 18 files changed, 26 insertions(+)
>
> diff --git a/src/gallium/docs/source/screen.rst
> b/src/gallium/docs/source/screen.rst
> index 485248261df..b1846dd2343 100644
> --- a/src/gallium/docs/source/screen.rst
> +++ b/src/gallium/docs/source/screen.rst
> @@ -451,20 +451,23 @@ PIPE_CONSERVATIVE_RASTER_PRE_SNAP mode is
> supported for points and lines.
> works with conservative rasterization.
> * ``PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS``: The
> maximum
> subpixel precision bias in bits during conservative rasterization.
> * ``PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS``: True is the driver
> supports
> programmable sample location through ```get_sample_pixel_grid``` and
> ```set_sample_locations```.
> * ``PIPE_CAP_MAX_GS_INVOCATIONS``: Maximum supported value of
> TGSI_PROPERTY_GS_INVOCATIONS.
> * ``PIPE_CAP_MAX_SHADER_BUFFER_SIZE``: Maximum supported size for
> binding
> with set_shader_buffers.
> +* ``PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET: Maximum recommend
> memory size
> + for all active texture uploads combined. This is a performance hint.
> + 0 means no limit.
>
> .. _pipe_capf:
>
> PIPE_CAPF_*
> ^^^^^^^^^^^^^^^^
>
> The floating-point capabilities are:
>
> * ``PIPE_CAPF_MAX_LINE_WIDTH``: The maximum width of a regular line.
> * ``PIPE_CAPF_MAX_LINE_WIDTH_AA``: The maximum width of a smoothed
> line.
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c
> b/src/gallium/drivers/etnaviv/etnaviv_screen.c
> index 9669bd2f601..497bc37ad0e 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
> @@ -277,20 +277,21 @@ etna_screen_get_param(struct pipe_screen
> *pscreen, enum pipe_cap param)
> case PIPE_CAP_FENCE_SIGNAL:
> case PIPE_CAP_CONSTBUF0_FLAGS:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
> case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
> case PIPE_CAP_PACKED_UNIFORMS:
> case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
>
> case PIPE_CAP_MAX_GS_INVOCATIONS:
> return 32;
>
> case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
> return 1 << 27;
>
> /* Stream output. */
> case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
> diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c
> b/src/gallium/drivers/freedreno/freedreno_screen.c
> index 489986703cd..c91f7094025 100644
> --- a/src/gallium/drivers/freedreno/freedreno_screen.c
> +++ b/src/gallium/drivers/freedreno/freedreno_screen.c
> @@ -208,20 +208,21 @@ fd_screen_get_param(struct pipe_screen *pscreen,
> enum pipe_cap param)
>
> case PIPE_CAP_COMPUTE:
> return has_compute(screen);
>
> case PIPE_CAP_SHADER_STENCIL_EXPORT:
> case PIPE_CAP_TGSI_TEXCOORD:
> case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
> case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
> case PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE:
> case PIPE_CAP_QUERY_MEMORY_INFO:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> case PIPE_CAP_PCI_GROUP:
> case PIPE_CAP_PCI_BUS:
> case PIPE_CAP_PCI_DEVICE:
> case PIPE_CAP_PCI_FUNCTION:
> return 0;
>
> case PIPE_CAP_SM3:
> case PIPE_CAP_PRIMITIVE_RESTART:
> case PIPE_CAP_TGSI_INSTANCEID:
> case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
> diff --git a/src/gallium/drivers/i915/i915_screen.c
> b/src/gallium/drivers/i915/i915_screen.c
> index 103725ca5c8..7a8bd91a43c 100644
> --- a/src/gallium/drivers/i915/i915_screen.c
> +++ b/src/gallium/drivers/i915/i915_screen.c
> @@ -283,20 +283,21 @@ i915_get_param(struct pipe_screen *screen, enum
> pipe_cap cap)
> case PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED:
> case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
> case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
> case PIPE_CAP_POST_DEPTH_COVERAGE:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
> case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
>
> case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
> case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
> case PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS:
> case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
> case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
> case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
> case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
> case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
> diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c
> b/src/gallium/drivers/llvmpipe/lp_screen.c
> index dacd9219756..25e38d2d3f1 100644
> --- a/src/gallium/drivers/llvmpipe/lp_screen.c
> +++ b/src/gallium/drivers/llvmpipe/lp_screen.c
> @@ -130,20 +130,21 @@ llvmpipe_get_param(struct pipe_screen *screen,
> enum pipe_cap param)
> case PIPE_CAP_QUERY_TIMESTAMP:
> return 1;
> case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> return 1;
> case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
> case PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE:
> return 1;
> case PIPE_CAP_TEXTURE_SWIZZLE:
> return 1;
> case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
> case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
> return LP_MAX_TEXTURE_2D_LEVELS;
> case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
> return LP_MAX_TEXTURE_3D_LEVELS;
> case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
> return LP_MAX_TEXTURE_CUBE_LEVELS;
> case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
> return LP_MAX_TEXTURE_ARRAY_LAYERS;
> case PIPE_CAP_BLEND_EQUATION_SEPARATE:
> diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> index da7ebecd5d7..80eb042671e 100644
> --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> @@ -232,20 +232,21 @@ nv30_screen_get_param(struct pipe_screen
> *pscreen, enum pipe_cap param)
> case PIPE_CAP_FENCE_SIGNAL:
> case PIPE_CAP_CONSTBUF0_FLAGS:
> case PIPE_CAP_PACKED_UNIFORMS:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
> case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
> case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
>
> case PIPE_CAP_MAX_GS_INVOCATIONS:
> return 32;
> case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
> return 1 << 27;
> case PIPE_CAP_VENDOR_ID:
> return 0x10de;
> case PIPE_CAP_DEVICE_ID: {
> uint64_t device_id;
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> index 0007a2b9576..42c99364b66 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> @@ -286,20 +286,21 @@ nv50_screen_get_param(struct pipe_screen
> *pscreen, enum pipe_cap param)
> case PIPE_CAP_FENCE_SIGNAL:
> case PIPE_CAP_CONSTBUF0_FLAGS:
> case PIPE_CAP_PACKED_UNIFORMS:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
> case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
> case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
>
> case PIPE_CAP_MAX_GS_INVOCATIONS:
> return 32;
> case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
> return 1 << 27;
> case PIPE_CAP_VENDOR_ID:
> return 0x10de;
> case PIPE_CAP_DEVICE_ID: {
> uint64_t device_id;
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> index 4701b768bec..d58caa62a05 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> @@ -313,20 +313,21 @@ nvc0_screen_get_param(struct pipe_screen
> *pscreen, enum pipe_cap param)
> case PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS:
> case PIPE_CAP_TILE_RASTER_ORDER:
> case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
> case PIPE_CAP_FRAMEBUFFER_MSAA_CONSTRAINTS:
> case PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET:
> case PIPE_CAP_CONTEXT_PRIORITY_MASK:
> case PIPE_CAP_FENCE_SIGNAL:
> case PIPE_CAP_CONSTBUF0_FLAGS:
> case PIPE_CAP_PACKED_UNIFORMS:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
>
> case PIPE_CAP_VENDOR_ID:
> return 0x10de;
> case PIPE_CAP_DEVICE_ID: {
> uint64_t device_id;
> if (nouveau_getparam(dev, NOUVEAU_GETPARAM_PCI_DEVICE,
> &device_id)) {
> NOUVEAU_ERR("NOUVEAU_GETPARAM_PCI_DEVICE failed.\n");
> return -1;
> }
> diff --git a/src/gallium/drivers/r300/r300_screen.c
> b/src/gallium/drivers/r300/r300_screen.c
> index 01a95d98dcf..11042baba92 100644
> --- a/src/gallium/drivers/r300/r300_screen.c
> +++ b/src/gallium/drivers/r300/r300_screen.c
> @@ -254,20 +254,21 @@ static int r300_get_param(struct pipe_screen*
> pscreen, enum pipe_cap param)
> case PIPE_CAP_FENCE_SIGNAL:
> case PIPE_CAP_CONSTBUF0_FLAGS:
> case PIPE_CAP_PACKED_UNIFORMS:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
> case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
> case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
>
> case PIPE_CAP_MAX_GS_INVOCATIONS:
> return 32;
> case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
> return 1 << 27;
>
> /* SWTCL-only features. */
> case PIPE_CAP_PRIMITIVE_RESTART:
> case PIPE_CAP_USER_VERTEX_BUFFERS:
> diff --git a/src/gallium/drivers/r600/r600_pipe.c
> b/src/gallium/drivers/r600/r600_pipe.c
> index d9dae26d1c5..9516de05e72 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -302,20 +302,24 @@ static int r600_get_param(struct pipe_screen*
> pscreen, enum pipe_cap param)
> case PIPE_CAP_QUERY_MEMORY_INFO:
> case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
> case PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED:
> case PIPE_CAP_CLEAR_TEXTURE:
> case PIPE_CAP_TGSI_MUL_ZERO_WINS:
> case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
> case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
> case PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR:
> return 1;
>
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> + /* Optimal number for good TexSubImage performance on Polaris10. */
> + return 64 * 1024 * 1024;
> +
> case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> return rscreen->b.info.drm_major == 2 && rscreen->b.info.drm_minor
> >= 43;
>
> case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
> return !R600_BIG_ENDIAN && rscreen->b.info.has_userptr;
>
> case PIPE_CAP_COMPUTE:
> return rscreen->b.chip_class > R700;
>
> case PIPE_CAP_TGSI_TEXCOORD:
> diff --git a/src/gallium/drivers/radeonsi/si_get.c
> b/src/gallium/drivers/radeonsi/si_get.c
> index 90f62edf470..54dd8a5d206 100644
> --- a/src/gallium/drivers/radeonsi/si_get.c
> +++ b/src/gallium/drivers/radeonsi/si_get.c
> @@ -181,20 +181,24 @@ static int si_get_param(struct pipe_screen
> *pscreen, enum pipe_cap param)
> case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
> case PIPE_CAP_MAX_WINDOW_RECTANGLES:
> return 4;
>
> case PIPE_CAP_GLSL_FEATURE_LEVEL:
> case PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY:
> if (sscreen->info.has_indirect_compute_dispatch)
> return 450;
> return 420;
>
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> + /* Optimal number for good TexSubImage performance on Polaris10. */
> + return 64 * 1024 * 1024;
> +
> case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
> case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
> return MIN2(sscreen->info.max_alloc_size, INT_MAX);
>
> case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
> case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
> case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
> return !sscreen->info.has_unaligned_shader_loads;
>
> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
> diff --git a/src/gallium/drivers/softpipe/sp_screen.c
> b/src/gallium/drivers/softpipe/sp_screen.c
> index db32c9e3b32..261c96d1b2f 100644
> --- a/src/gallium/drivers/softpipe/sp_screen.c
> +++ b/src/gallium/drivers/softpipe/sp_screen.c
> @@ -84,20 +84,21 @@ softpipe_get_param(struct pipe_screen *screen,
> enum pipe_cap param)
> case PIPE_CAP_QUERY_TIME_ELAPSED:
> return 1;
> case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> return 1;
> case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
> case PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE:
> return 1;
> case PIPE_CAP_TEXTURE_SWIZZLE:
> return 1;
> case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
> case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
> return SP_MAX_TEXTURE_2D_LEVELS;
> case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
> return SP_MAX_TEXTURE_3D_LEVELS;
> case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
> return SP_MAX_TEXTURE_CUBE_LEVELS;
> case PIPE_CAP_BLEND_EQUATION_SEPARATE:
> return 1;
> case PIPE_CAP_INDEP_BLEND_ENABLE:
> diff --git a/src/gallium/drivers/svga/svga_screen.c
> b/src/gallium/drivers/svga/svga_screen.c
> index 54c49d165f7..5d0ca46d9c7 100644
> --- a/src/gallium/drivers/svga/svga_screen.c
> +++ b/src/gallium/drivers/svga/svga_screen.c
> @@ -383,20 +383,21 @@ svga_get_param(struct pipe_screen *screen, enum
> pipe_cap param)
> case PIPE_CAP_PCI_BUS:
> case PIPE_CAP_PCI_DEVICE:
> case PIPE_CAP_PCI_FUNCTION:
> case PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
> case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
> case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
> return 64;
> case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
> case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
> case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
> return 1; /* need 4-byte alignment for all offsets and strides
> */
> case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
> return 2048;
> case PIPE_CAP_MAX_VIEWPORTS:
> diff --git a/src/gallium/drivers/swr/swr_screen.cpp
> b/src/gallium/drivers/swr/swr_screen.cpp
> index 706ed5621cd..964865b08f2 100644
> --- a/src/gallium/drivers/swr/swr_screen.cpp
> +++ b/src/gallium/drivers/swr/swr_screen.cpp
> @@ -355,20 +355,21 @@ swr_get_param(struct pipe_screen *screen, enum
> pipe_cap param)
> case PIPE_CAP_FENCE_SIGNAL:
> case PIPE_CAP_CONSTBUF0_FLAGS:
> case PIPE_CAP_PACKED_UNIFORMS:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
> case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
> case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
> case PIPE_CAP_MAX_GS_INVOCATIONS:
> return 32;
> case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
> return 1 << 27;
>
> case PIPE_CAP_VENDOR_ID:
> return 0xFFFFFFFF;
> case PIPE_CAP_DEVICE_ID:
> return 0xFFFFFFFF;
> diff --git a/src/gallium/drivers/v3d/v3d_screen.c
> b/src/gallium/drivers/v3d/v3d_screen.c
> index 8a166c18fa7..3002d624cf9 100644
> --- a/src/gallium/drivers/v3d/v3d_screen.c
> +++ b/src/gallium/drivers/v3d/v3d_screen.c
> @@ -266,20 +266,21 @@ v3d_screen_get_param(struct pipe_screen
> *pscreen, enum pipe_cap param)
> case PIPE_CAP_CONTEXT_PRIORITY_MASK:
> case PIPE_CAP_CONSTBUF0_FLAGS:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
> case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
> case PIPE_CAP_PACKED_UNIFORMS:
> case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
>
> /* Geometry shader output, unsupported. */
> case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES:
> case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
> case PIPE_CAP_MAX_GS_INVOCATIONS:
> return 0;
> case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
> return 1 << 27;
>
> diff --git a/src/gallium/drivers/vc4/vc4_screen.c
> b/src/gallium/drivers/vc4/vc4_screen.c
> index b88110a86c5..1af9c99a604 100644
> --- a/src/gallium/drivers/vc4/vc4_screen.c
> +++ b/src/gallium/drivers/vc4/vc4_screen.c
> @@ -294,20 +294,21 @@ vc4_screen_get_param(struct pipe_screen
> *pscreen, enum pipe_cap param)
> case PIPE_CAP_FENCE_SIGNAL:
> case PIPE_CAP_CONSTBUF0_FLAGS:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
> case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
> case PIPE_CAP_PACKED_UNIFORMS:
> case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
>
> /* Stream output. */
> case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
> case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
> case PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS:
> case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
> case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
> return 0;
>
> diff --git a/src/gallium/drivers/virgl/virgl_screen.c
> b/src/gallium/drivers/virgl/virgl_screen.c
> index dd97b3d3f96..8fa30fc5e1f 100644
> --- a/src/gallium/drivers/virgl/virgl_screen.c
> +++ b/src/gallium/drivers/virgl/virgl_screen.c
> @@ -309,20 +309,21 @@ virgl_get_param(struct pipe_screen *screen, enum
> pipe_cap param)
> case PIPE_CAP_FENCE_SIGNAL:
> case PIPE_CAP_CONSTBUF0_FLAGS:
> case PIPE_CAP_PACKED_UNIFORMS:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
> case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES:
> case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
> case PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS:
> case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
> + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
> return 0;
> case PIPE_CAP_MAX_GS_INVOCATIONS:
> return 32;
> case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
> return 1 << 27;
> case PIPE_CAP_VENDOR_ID:
> return 0x1af4;
> case PIPE_CAP_DEVICE_ID:
> return 0x1010;
> case PIPE_CAP_ACCELERATED:
> diff --git a/src/gallium/include/pipe/p_defines.h
> b/src/gallium/include/pipe/p_defines.h
> index 3bc908d1a0e..c7645065c36 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -811,20 +811,21 @@ enum pipe_cap
> PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES,
> PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES,
> PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES,
> PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES,
> PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS,
> PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE,
> PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS,
> PIPE_CAP_MAX_GS_INVOCATIONS,
> PIPE_CAP_MAX_SHADER_BUFFER_SIZE,
> PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE,
> + PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET,
> };
>
> /**
> * Possible bits for PIPE_CAP_CONTEXT_PRIORITY_MASK param, which
> should
> * return a bitmask of the supported priorities. If the driver does
> not
> * support prioritized contexts, it can return 0.
> *
> * Note that these match __DRI2_RENDER_HAS_CONTEXT_PRIORITY_*
> */
> #define PIPE_CONTEXT_PRIORITY_LOW (1 << 0)
More information about the mesa-dev
mailing list