[Mesa-dev] [PATCH 18/92] gallium: add PIPE_CAP_NIR_LOWER_IO
Nicolai Hähnle
nhaehnle at gmail.com
Mon Jul 3 13:23:51 UTC 2017
Hi Connor,
On 27.06.2017 02:25, Connor Abbott wrote:
> Ok, so I just looked into it a little further, and I guess that since
> nir_to_llvm needs to know about the ABI to know where all the
> "special" inputs/outputs like tess factors, position etc. are,
> switching radv to using the normal input/output intrinsics would be
> better done as part of your series, so I'll leave that to you. In the
> meantime, though, I'm going to send out some patches which improve
> radv's local variable handling which also remove one of the users of
> radv_get_deref_offset() that ultimately needs to go. It'll cause some
> rebase conflicts for you, but they shouldn't be so hard to solve.
So I just looked into this in more detail, and now I remember why I
decided to stick with passing on nir_lower_io during my first cut:
non-constant array offsets are a pain.
On GCN, we cannot actually do indirect indexing of vertex and fragment
shader inputs/outputs. We work around this by temporarily putting arrays
into LLVM vectors and using non-constant extract/insertelement instructions.
The problem is: if we don't have a bound on the array sizes, then this
becomes extremely inefficient. This is a big part of why TGSI has all
the ArrayID-fu.
I see that load_uniform and load_push_constant have a RANGE const_index
specifying the array size. So I'm thinking of adding this to
load_(per_vertex_)input and store_output as well.
Does that sound good?
Cheers,
Nicolai
>
> On Mon, Jun 26, 2017 at 12:25 PM, Connor Abbott <cwabbott0 at gmail.com> wrote:
>> Forgot to mention... I think I'll take a pass at doing this today.
>> It'll distract me from some weird bug I've been trying to fight with
>> the AMD_shader_ballot stuff :)
>>
>> On Mon, Jun 26, 2017 at 12:24 PM, Connor Abbott <cwabbott0 at gmail.com> wrote:
>>> So, I think that rather than doing this, we should make radv call
>>> nir_lower_io instead. There's currently a bunch of code in the
>>> NIR-to-LLVM translation to calculate dereference offsets and split up
>>> loads, which is just silly - use the lowering pass instead!
>>>
>>> On Mon, Jun 26, 2017 at 7:09 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
>>>> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>>>>
>>>> Existing NIR drivers return 1 here, since that reflects the current
>>>> behavior.
>>>> ---
>>>> src/gallium/docs/source/screen.rst | 5 +++++
>>>> 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 | 1 +
>>>> src/gallium/drivers/radeonsi/si_pipe.c | 1 +
>>>> 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/vc4/vc4_screen.c | 1 +
>>>> src/gallium/drivers/virgl/virgl_screen.c | 1 +
>>>> src/gallium/include/pipe/p_defines.h | 1 +
>>>> 17 files changed, 21 insertions(+)
>>>>
>>>> diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
>>>> index b375e53..9dab38b 100644
>>>> --- a/src/gallium/docs/source/screen.rst
>>>> +++ b/src/gallium/docs/source/screen.rst
>>>> @@ -391,20 +391,25 @@ The integer capabilities:
>>>> shader outputs.
>>>> * ``PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX``: Whether a buffer with just
>>>> PIPE_BIND_CONSTANT_BUFFER can be legally passed to set_vertex_buffers.
>>>> * ``PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION``: As the name says.
>>>> * ``PIPE_CAP_POST_DEPTH_COVERAGE``: whether
>>>> ``TGSI_PROPERTY_FS_POST_DEPTH_COVERAGE`` is supported.
>>>> * ``PIPE_CAP_BINDLESS_TEXTURE``: Whether bindless texture operations are
>>>> supported.
>>>> * ``PIPE_CAP_NIR_SAMPLERS_AS_DEREF``: Whether NIR tex instructions should
>>>> reference texture and sampler as NIR derefs instead of by indices.
>>>> +* ``PIPE_CAP_NIR_LOWER_IO``: Whether the nir_lower_io pass should be run to
>>>> + replace variable accesses by the corresponding intrinsics. Note that when
>>>> + this is false, the state tracker can no longer leave accesses to
>>>> + default-block uniforms in the shader, meaning that nir_lower_uniforms_to_ubo
>>>> + is used.
>>>>
>>>>
>>>> .. _pipe_capf:
>>>>
>>>> PIPE_CAPF_*
>>>> ^^^^^^^^^^^^^^^^
>>>>
>>>> The floating-point capabilities are:
>>>>
>>>> * ``PIPE_CAPF_MAX_LINE_WIDTH``: The maximum width of a regular line.
>>>> diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
>>>> index 85b7e91..7f2a231 100644
>>>> --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
>>>> +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
>>>> @@ -252,20 +252,21 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>>>> case PIPE_CAP_TGSI_CLOCK:
>>>> case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
>>>> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
>>>> case PIPE_CAP_TGSI_BALLOT:
>>>> case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
>>>> case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
>>>> case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
>>>> case PIPE_CAP_POST_DEPTH_COVERAGE:
>>>> case PIPE_CAP_BINDLESS_TEXTURE:
>>>> case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> return 0;
>>>>
>>>> /* Stream output. */
>>>> case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
>>>> case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
>>>> case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
>>>> case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
>>>> return 0;
>>>>
>>>> /* Geometry shader output, unsupported. */
>>>> diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
>>>> index 6380996..8fab5fd 100644
>>>> --- a/src/gallium/drivers/freedreno/freedreno_screen.c
>>>> +++ b/src/gallium/drivers/freedreno/freedreno_screen.c
>>>> @@ -174,20 +174,21 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>>>> case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
>>>> case PIPE_CAP_SEAMLESS_CUBE_MAP:
>>>> case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
>>>> case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
>>>> 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_BUFFER_MAP_PERSISTENT_COHERENT:
>>>> case PIPE_CAP_STRING_MARKER:
>>>> case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> return 1;
>>>>
>>>> case PIPE_CAP_VERTEXID_NOBASE:
>>>> return is_a3xx(screen) || is_a4xx(screen);
>>>>
>>>> case PIPE_CAP_USER_CONSTANT_BUFFERS:
>>>> return is_a4xx(screen) ? 0 : 1;
>>>>
>>>> case PIPE_CAP_COMPUTE:
>>>> return has_compute(screen);
>>>> diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
>>>> index 3a0dade..17f4858 100644
>>>> --- a/src/gallium/drivers/i915/i915_screen.c
>>>> +++ b/src/gallium/drivers/i915/i915_screen.c
>>>> @@ -304,20 +304,21 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
>>>> case PIPE_CAP_INT64_DIVMOD:
>>>> case PIPE_CAP_TGSI_TEX_TXF_LZ:
>>>> case PIPE_CAP_TGSI_CLOCK:
>>>> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
>>>> case PIPE_CAP_TGSI_BALLOT:
>>>> case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
>>>> case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
>>>> case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
>>>> case PIPE_CAP_BINDLESS_TEXTURE:
>>>> case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> return 0;
>>>>
>>>> case PIPE_CAP_MAX_VIEWPORTS:
>>>> return 1;
>>>>
>>>> case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
>>>> return 64;
>>>>
>>>> case PIPE_CAP_GLSL_FEATURE_LEVEL:
>>>> return 120;
>>>> diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
>>>> index 08edc08..df3edcf 100644
>>>> --- a/src/gallium/drivers/llvmpipe/lp_screen.c
>>>> +++ b/src/gallium/drivers/llvmpipe/lp_screen.c
>>>> @@ -350,20 +350,21 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
>>>> case PIPE_CAP_TGSI_CLOCK:
>>>> case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
>>>> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
>>>> case PIPE_CAP_TGSI_BALLOT:
>>>> case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
>>>> case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
>>>> case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
>>>> case PIPE_CAP_POST_DEPTH_COVERAGE:
>>>> case PIPE_CAP_BINDLESS_TEXTURE:
>>>> case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> return 0;
>>>> }
>>>> /* should only get here on unhandled cases */
>>>> debug_printf("Unexpected PIPE_CAP %d query\n", param);
>>>> return 0;
>>>> }
>>>>
>>>> static int
>>>> llvmpipe_get_shader_param(struct pipe_screen *screen,
>>>> enum pipe_shader_type shader,
>>>> diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
>>>> index 570a5d4..0acc12e 100644
>>>> --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
>>>> +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
>>>> @@ -214,20 +214,21 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>>>> case PIPE_CAP_TGSI_TEX_TXF_LZ:
>>>> case PIPE_CAP_TGSI_CLOCK:
>>>> case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
>>>> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
>>>> case PIPE_CAP_TGSI_BALLOT:
>>>> case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
>>>> case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
>>>> case PIPE_CAP_POST_DEPTH_COVERAGE:
>>>> case PIPE_CAP_BINDLESS_TEXTURE:
>>>> case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> 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/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
>>>> index fbda514..8347a2c 100644
>>>> --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
>>>> +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
>>>> @@ -266,20 +266,21 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>>>> case PIPE_CAP_DOUBLES:
>>>> case PIPE_CAP_INT64:
>>>> case PIPE_CAP_INT64_DIVMOD:
>>>> case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
>>>> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
>>>> case PIPE_CAP_TGSI_BALLOT:
>>>> case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
>>>> case PIPE_CAP_POST_DEPTH_COVERAGE:
>>>> case PIPE_CAP_BINDLESS_TEXTURE:
>>>> case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> 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/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
>>>> index 6a7a575..65d4d43 100644
>>>> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
>>>> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
>>>> @@ -295,20 +295,21 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>>>> case PIPE_CAP_PCI_DEVICE:
>>>> case PIPE_CAP_PCI_FUNCTION:
>>>> case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
>>>> case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
>>>> case PIPE_CAP_NATIVE_FENCE_FD:
>>>> case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
>>>> case PIPE_CAP_INT64_DIVMOD:
>>>> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
>>>> case PIPE_CAP_BINDLESS_TEXTURE:
>>>> case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> 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 a994a05..4caa94f 100644
>>>> --- a/src/gallium/drivers/r300/r300_screen.c
>>>> +++ b/src/gallium/drivers/r300/r300_screen.c
>>>> @@ -236,20 +236,21 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>>>> case PIPE_CAP_TGSI_TEX_TXF_LZ:
>>>> case PIPE_CAP_TGSI_CLOCK:
>>>> case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
>>>> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
>>>> case PIPE_CAP_TGSI_BALLOT:
>>>> case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
>>>> case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
>>>> case PIPE_CAP_POST_DEPTH_COVERAGE:
>>>> case PIPE_CAP_BINDLESS_TEXTURE:
>>>> case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> return 0;
>>>>
>>>> /* SWTCL-only features. */
>>>> case PIPE_CAP_PRIMITIVE_RESTART:
>>>> case PIPE_CAP_USER_VERTEX_BUFFERS:
>>>> case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
>>>> return !r300screen->caps.has_tcl;
>>>>
>>>> /* HWTCL-only features / limitations. */
>>>> case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
>>>> diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
>>>> index f09e468..86c7e92 100644
>>>> --- a/src/gallium/drivers/r600/r600_pipe.c
>>>> +++ b/src/gallium/drivers/r600/r600_pipe.c
>>>> @@ -392,20 +392,21 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>>>> case PIPE_CAP_INT64_DIVMOD:
>>>> case PIPE_CAP_TGSI_TEX_TXF_LZ:
>>>> case PIPE_CAP_TGSI_CLOCK:
>>>> case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
>>>> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
>>>> case PIPE_CAP_TGSI_BALLOT:
>>>> case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
>>>> case PIPE_CAP_POST_DEPTH_COVERAGE:
>>>> case PIPE_CAP_BINDLESS_TEXTURE:
>>>> case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> return 0;
>>>>
>>>> case PIPE_CAP_DOUBLES:
>>>> if (rscreen->b.family == CHIP_ARUBA ||
>>>> rscreen->b.family == CHIP_CAYMAN ||
>>>> rscreen->b.family == CHIP_CYPRESS ||
>>>> rscreen->b.family == CHIP_HEMLOCK)
>>>> return 1;
>>>> return 0;
>>>>
>>>> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
>>>> index 05a4555..6727f84 100644
>>>> --- a/src/gallium/drivers/radeonsi/si_pipe.c
>>>> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
>>>> @@ -585,20 +585,21 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>>>> case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
>>>> case PIPE_CAP_VERTEXID_NOBASE:
>>>> case PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES:
>>>> case PIPE_CAP_MAX_WINDOW_RECTANGLES:
>>>> case PIPE_CAP_NATIVE_FENCE_FD:
>>>> case PIPE_CAP_TGSI_FS_FBFETCH:
>>>> case PIPE_CAP_TGSI_MUL_ZERO_WINS:
>>>> case PIPE_CAP_UMA:
>>>> case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
>>>> case PIPE_CAP_POST_DEPTH_COVERAGE:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> return 0;
>>>>
>>>> case PIPE_CAP_QUERY_BUFFER_OBJECT:
>>>> return si_have_tgsi_compute(sscreen);
>>>>
>>>> case PIPE_CAP_DRAW_PARAMETERS:
>>>> case PIPE_CAP_MULTI_DRAW_INDIRECT:
>>>> case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
>>>> return sscreen->has_draw_indirect_multi;
>>>>
>>>> diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
>>>> index 6ed2ce1..eadd476 100644
>>>> --- a/src/gallium/drivers/softpipe/sp_screen.c
>>>> +++ b/src/gallium/drivers/softpipe/sp_screen.c
>>>> @@ -300,20 +300,21 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
>>>> case PIPE_CAP_TGSI_CLOCK:
>>>> case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
>>>> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
>>>> case PIPE_CAP_TGSI_BALLOT:
>>>> case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
>>>> case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
>>>> case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
>>>> case PIPE_CAP_POST_DEPTH_COVERAGE:
>>>> case PIPE_CAP_BINDLESS_TEXTURE:
>>>> case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> return 0;
>>>> case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
>>>> return 4;
>>>> }
>>>> /* should only get here on unhandled cases */
>>>> debug_printf("Unexpected PIPE_CAP %d query\n", param);
>>>> return 0;
>>>> }
>>>>
>>>> static int
>>>> diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
>>>> index 6126b55..01443a7 100644
>>>> --- a/src/gallium/drivers/svga/svga_screen.c
>>>> +++ b/src/gallium/drivers/svga/svga_screen.c
>>>> @@ -439,20 +439,21 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
>>>> case PIPE_CAP_TGSI_CLOCK:
>>>> case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
>>>> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
>>>> case PIPE_CAP_TGSI_BALLOT:
>>>> case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
>>>> case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
>>>> case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
>>>> case PIPE_CAP_POST_DEPTH_COVERAGE:
>>>> case PIPE_CAP_BINDLESS_TEXTURE:
>>>> case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> return 0;
>>>> }
>>>>
>>>> debug_printf("Unexpected PIPE_CAP_ query %u\n", param);
>>>> return 0;
>>>> }
>>>>
>>>>
>>>> static int
>>>> vgpu9_get_shader_param(struct pipe_screen *screen,
>>>> diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp
>>>> index b0796bb..1e51d88 100644
>>>> --- a/src/gallium/drivers/swr/swr_screen.cpp
>>>> +++ b/src/gallium/drivers/swr/swr_screen.cpp
>>>> @@ -335,20 +335,21 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
>>>> case PIPE_CAP_TGSI_CLOCK:
>>>> case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
>>>> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
>>>> case PIPE_CAP_TGSI_BALLOT:
>>>> case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
>>>> case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
>>>> case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
>>>> case PIPE_CAP_POST_DEPTH_COVERAGE:
>>>> case PIPE_CAP_BINDLESS_TEXTURE:
>>>> case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> return 0;
>>>>
>>>> case PIPE_CAP_VENDOR_ID:
>>>> return 0xFFFFFFFF;
>>>> case PIPE_CAP_DEVICE_ID:
>>>> return 0xFFFFFFFF;
>>>> case PIPE_CAP_ACCELERATED:
>>>> return 0;
>>>> case PIPE_CAP_VIDEO_MEMORY: {
>>>> /* XXX: Do we want to return the full amount of system memory ? */
>>>> diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
>>>> index 6acd9bf..f4a207f 100644
>>>> --- a/src/gallium/drivers/vc4/vc4_screen.c
>>>> +++ b/src/gallium/drivers/vc4/vc4_screen.c
>>>> @@ -122,20 +122,21 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>>>> case PIPE_CAP_NPOT_TEXTURES:
>>>> case PIPE_CAP_SHAREABLE_SHADERS:
>>>> case PIPE_CAP_USER_CONSTANT_BUFFERS:
>>>> case PIPE_CAP_TEXTURE_SHADOW_MAP:
>>>> case PIPE_CAP_BLEND_EQUATION_SEPARATE:
>>>> case PIPE_CAP_TWO_SIDED_STENCIL:
>>>> case PIPE_CAP_TEXTURE_MULTISAMPLE:
>>>> case PIPE_CAP_TEXTURE_SWIZZLE:
>>>> case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
>>>> case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> return 1;
>>>>
>>>> /* lying for GL 2.0 */
>>>> case PIPE_CAP_OCCLUSION_QUERY:
>>>> case PIPE_CAP_POINT_SPRITE:
>>>> return 1;
>>>>
>>>> case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
>>>> return 256;
>>>>
>>>> diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
>>>> index e155b4a..8a579a0 100644
>>>> --- a/src/gallium/drivers/virgl/virgl_screen.c
>>>> +++ b/src/gallium/drivers/virgl/virgl_screen.c
>>>> @@ -259,20 +259,21 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
>>>> case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
>>>> case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
>>>> case PIPE_CAP_TGSI_BALLOT:
>>>> case PIPE_CAP_DOUBLES:
>>>> case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
>>>> case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
>>>> case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
>>>> case PIPE_CAP_POST_DEPTH_COVERAGE:
>>>> case PIPE_CAP_BINDLESS_TEXTURE:
>>>> case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
>>>> + case PIPE_CAP_NIR_LOWER_IO:
>>>> return 0;
>>>> case PIPE_CAP_VENDOR_ID:
>>>> return 0x1af4;
>>>> case PIPE_CAP_DEVICE_ID:
>>>> return 0x1010;
>>>> case PIPE_CAP_ACCELERATED:
>>>> return 1;
>>>> case PIPE_CAP_UMA:
>>>> case PIPE_CAP_VIDEO_MEMORY:
>>>> return 0;
>>>> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
>>>> index 08690ba..460238e 100644
>>>> --- a/src/gallium/include/pipe/p_defines.h
>>>> +++ b/src/gallium/include/pipe/p_defines.h
>>>> @@ -774,20 +774,21 @@ enum pipe_cap
>>>> PIPE_CAP_TGSI_CLOCK,
>>>> PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE,
>>>> PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE,
>>>> PIPE_CAP_TGSI_BALLOT,
>>>> PIPE_CAP_TGSI_TES_LAYER_VIEWPORT,
>>>> PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX,
>>>> PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION,
>>>> PIPE_CAP_POST_DEPTH_COVERAGE,
>>>> PIPE_CAP_BINDLESS_TEXTURE,
>>>> PIPE_CAP_NIR_SAMPLERS_AS_DEREF,
>>>> + PIPE_CAP_NIR_LOWER_IO,
>>>> };
>>>>
>>>> #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
>>>> #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600 (1 << 1)
>>>>
>>>> enum pipe_endian
>>>> {
>>>> PIPE_ENDIAN_LITTLE = 0,
>>>> PIPE_ENDIAN_BIG = 1,
>>>> #if defined(PIPE_ARCH_LITTLE_ENDIAN)
>>>> --
>>>> 2.9.3
>>>>
>>>> _______________________________________________
>>>> mesa-dev mailing list
>>>> mesa-dev at lists.freedesktop.org
>>>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the mesa-dev
mailing list