Commit Graph

149376 Commits

Author SHA1 Message Date
Adam Jackson 272fba8e75 wsi/x11: Avoid a class of deadlocks in the WSI queue thread
Here are two facts, each mildly unpleasant, quite nasty taken together:

- xcb_wait_for_special_event retries its poll() if the fd woke up but
  no matching event arrived, without verifying that the special event
  queue is still registered.
- Present gives no in-band notification of window destruction.

Now if the window is destroyed before the swapchain we're in trouble.
Our WSI thread might be stuck in xcb_wait_for_special_event as we're
awaiting a completion that won't come (the pixmap was being presented as
the window, and then the window was destroyed, so no more events can
happen on that window).

The solution is to use xcb_poll_for_special_event, which is
non-blocking, and handle the appropriate edge cases. If we've run the
event queue but we still don't have an image to acquire, we poke the X
server with a request that gently verifies that the window exists,
allowing the thread to exit gracefully in the above case.  We detect
when we're busy-looping, and poll on the X connection for up to 1ms in
response to avoid burning the CPU.

Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13564>
2022-01-21 19:46:14 +00:00
Bas Nieuwenhuizen d1530a3f3b Revert "nir/algebraic: distribute fmul(fadd(a, b), c) when b and c are constants"
This reverts commit a1af902531.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5423
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14532>
2022-01-21 16:58:11 +00:00
Charles Baker 1b88777e97 Revert "zink: handle vertex buffer offset overflows"
This reverts commit 9823b970fb.

From VkPhysicalDeviceLimits [1]:

> maxVertexInputAttributeOffset is the maximum vertex input attribute
offset that can be added to the vertex input binding stride. The offset
member of the VkVertexInputAttributeDescription structure must be
less than or equal to this limit.

The maxVertexInputAttributeOffset is a limit on the offset of a vertex
attribute within a vertex rather than a limit on offsets for vertex
buffer bindings.  The code to bind temporary buffers can be removed.

[1] https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceLimits.html

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14572>
2022-01-21 16:44:14 +00:00
Rhys Perry 3712cd2767 radv: use 8x4 workgroups for wave32 RT
Beginning of Quake II RTX, 50% resolution scale, RX 6800: 54 -> 56 FPS.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14011>
2022-01-21 16:25:16 +00:00
Rhys Perry e7002b6f96 radv: use wave32 for raytracing
Beginning of Quake II RTX, 50% resolution scale, RX 6800: 48 -> 54 FPS.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14011>
2022-01-21 16:25:16 +00:00
Rhys Perry 2298a96f9f radv: fix raytracing with wave32
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5452
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14011>
2022-01-21 16:25:16 +00:00
Charles Baker 61e3f549c5 zink: Set vertex binding stride without dynamic state extensions
EXT_vertex_input_dynamic_state

When both EXT_vertex_input_dynamic_state and EXT_extended_dynamic_state
are not available stride is never set and nothing is rasterized as all
triangles are degenerate.

This fix copies stride into the VkVertexInputBindingDescription array
when the graphics pipeline is created when those extensions aren't
available.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14549>
2022-01-21 15:30:54 +00:00
Charles Baker 0722cd7a30 zink: Avoid redundant cast to uint on PackHalf2x16 result
For example the previous code generates the following sequence of
SPIR-V instructions ending with a redundant cast to uint:

  %2018 = OpExtInst %uint %1 PackHalf2x16 %2017
  %2019 = OpBitcast %uint %2018

The new code generates:

  %2018 = OpExtInst %uint %1 PackHalf2x16 %2017

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14568>
2022-01-21 15:15:49 +00:00
Charles Baker 985dae7f41 zink: Output PackHalf2x16 to uint not float
Fixes InconsistentSpirv validation errors reporting that PackHalf2x16
outputs uint rather than float.

For example the previous code generates the following SPIR-V with
PackHalf2x16 output as a float:

  %2018 = OpExtInst %float %1 PackHalf2x16 %2017
  %2019 = OpBitcast %uint %2018

The new code generates:

  %2018 = OpExtInst %uint %1 PackHalf2x16 %2017
  %2019 = OpBitcast %uint %2018

cc: mesa-stable

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14568>
2022-01-21 15:15:49 +00:00
Rhys Perry 9e171b6d49 ac/nir: use shorter builder names
This makes a lot of lines shorter.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14455>
2022-01-21 13:45:33 +00:00
Rhys Perry 533118413b ac/nir: avoid providing an align_mul to intrinsic builders
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14455>
2022-01-21 13:45:33 +00:00
Rhys Perry c0a586bad7 ac/nir: avoid providing a write_mask to intrinsic builders
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14455>
2022-01-21 13:45:33 +00:00
Rhys Perry 8951608f08 radv: avoid providing an align_offset to intrinsic builders
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14455>
2022-01-21 13:45:33 +00:00
Rhys Perry 552e59aee3 radv: avoid providing an align_mul to intrinsic builders
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14455>
2022-01-21 13:45:33 +00:00
Rhys Perry 7833759a41 radv: avoid providing a write_mask to intrinsic builders
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14455>
2022-01-21 13:45:33 +00:00
Rhys Perry af51efe195 nir/builder: assume scalar alignment if not provided
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14455>
2022-01-21 13:45:33 +00:00
Rhys Perry e9e1a44872 nir/builder: set write mask if not provided
Zero isn't really a valid write mask. If it's provided, use a full write
mask.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14455>
2022-01-21 13:45:33 +00:00
Alejandro Piñeiro 275a18322d v3dv: check correct format when load/storing on a depth/stencil buffer
When we create a image view with D24S8 format we made a reformatting
to RGBA8UI if the aspect selected is just STENCIL. But when
configuring the stores we select the aspects based on the attachment
format. Quoting from cmd_buffer_render_pass_emit_stores:

      /* From the Vulkan spec, VkImageSubresourceRange:
       *
       *   "When an image view of a depth/stencil image is used as a
       *   depth/stencil framebuffer attachment, the aspectMask is ignored
       *   and both depth and stencil image subresources are used."
       *
       * So we ignore the aspects from the subresource range of the image
       * view for the depth/stencil attachment, but we still need to restrict
       * the to aspects compatible with the render pass and the image.
       */
      const VkImageAspectFlags aspects =
         vk_format_aspects(ds_attachment->desc.format);

So we could ending trying to store on a Z+Stencil buffer, using a
RGBA8UI format.

So far this only affected some tests when using the simulator
(assert). Those were working on the real hw, but probably would fail
on other situations, so lets use the original image format on that
case.

v2 (Iago)
   * Improve comment grammar
   * Do the same on load too (not just store)

v3 (Iago)
    * Re-word comments.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14635>
2022-01-21 13:24:18 +00:00
Alejandro Piñeiro 5d04b76c09 v3dv: remove unused v3dv_descriptor_map_get_texture_format
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14635>
2022-01-21 13:24:18 +00:00
Melissa Wen 9319ffb53d v3dv: signal fence when all submitted jobs complete execution
We track last submitted jobs by queue type. After all cmd buffer
batches have been submitted, we emit a noop job that waits all jobs
submitted to each GPU queue complete and signals the fence.

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Melissa Wen bce77e758a v3dv: process signal semaphores in the very last job
With multiple semaphores support, we can use a GPU job to handle
multiple signal semaphores in the end of a cmd buffer batch. It
means, the last job in the last cmd buffer will be in change of
signalling semaphores as long as it meets some conditions:
1 - A GPU-job signals semaphores whenever we only have submitted
jobs for the same queue (there is no syncobj created for any
other type). Otherwise, we emit a noop job that waits on the
completion of all jobs submitted and then signals semaphores.
2 - A CPU-job is never in charge of signalling semaphores. We
process it first and emit a noop job that depends on all jobs
previously submitted to signal semaphores.

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Melissa Wen 0ab98612ef v3dv: handle wait semaphores in the first job by queue
With multiple semaphore support, we can improve the way we handle
wait semaphores considering different job types and cmd buffer
batch scenarios, that means:

- A GPU job depends on wait semaphores whenever it is the first job
submitted to a queue in this command buffer batch (the `first` flag
for the job's queue type is set).
- For the first CPU job, if there are wait semaphores, we should
wait for the CPU and GPU being idle to process the job.

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Melissa Wen 03a6a82740 v3dv: track submitted jobs by GPU queue type
The order in which a GPU job is scheduled is guaranteed within the
same queue type (CL, TFU, CSD), but the order of completion of jobs
from different queues cannot be guaranteed. Since we have multiple
semaphores support now, we can track the completion of the last job
submitted to each queue and therefore better determine when gpu is
idle. We do it using an array of syncobj (last_job_syncs) for each
GPU queue (CL, TFU, CSD). With this, job serialization also become
more accurate. We also keep tracking the very last job submitted
(last_job_sync became an element of the last_job_syncs array as
V3DV_QUEUE_ANY) for the case we don't have multisync support.
To help in handling wait semaphores, we set a flag per queue to
indicate we are starting a new cmd buffer batch and a job submitted
to this queue will be the first.

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Melissa Wen fd973218a6 v3dv: enable GPU jobs to signal multiple semaphores
In addition to keep a copy of wait semaphores, extend
v3dv_submit_info_semaphores to hold a copy of signal semaphores too.
With a copy of wait and signal semaphores, we can enable GPU jobs to
handle more than one wait and signal semaphores.

By now, we don't change the way as we signalling semaphores when all
jobs complete, i.e., we still use the master thread to signal
semaphores. In this context, no GPU job is actually in charge of
signalling, but the support for multiple signal semaphores is done
here.

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Melissa Wen a7052dcf2c v3dv: enable multiple semaphores for csd job
Whenever v3d kernel-driver supports multisync extension, use it to
allow add multiple semaphores as csd job dependency.

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Melissa Wen ad09e50129 v3dv: enable multiple semaphores for tfu job
Whenever v3d kernel-driver supports multisync extension, use it to
enable more than one semaphores in a tfu job.

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Melissa Wen ff8586c345 v3dv: enable multiple semaphores on cl submission
Whenever v3d kernel-driver supports multisync extension, use it to
enable more than one semaphores in cl submission. In CL, we have two
kind of job (bin and render), therefore, we need also to determine
the stage to sync, that means to add job dependencies/wait
semaphores.

Also, as we currently process all signal semaphores of a cmd buffer
batch together in the submit master thread (when the last wait
thread completes), there isn't now a situation in which GPU jobs
need to handle signal VkSemaphores.

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Melissa Wen 85c49db10d v3dv: check multiple semaphores capability
Check if kernel-driver supports multisync extension

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Melissa Wen 264dedf690 drm-uapi/v3d: extend interface for multiple semaphores support
Extends command submission ioctls to support multiple semaphores through
generic ioctl extension design. In this approach, a multisync extension
subclasses a generic ioctl extension struct (base) and enables more than
one wait and signal semaphores. Multisync extension also uses v3d_queue
to specify the wait_stage, i.e. which job should sync before start (wait
semaphores).

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Melissa Wen d5bd18fbb3 v3dv: store wait semaphores in event_wait_cpu_job_info
Instead of a boolean (sem_wait) in v3dv_event_wait_cpu_job_info,
that is used to determine wait condition for jobs put in a wait
thread, copy the wait semaphores data and store it as struct
v3dv_submit_info_semaphores. In the following patches we enable
multiple semaphores in GPU jobs, and therefore we need this data
to add wait semaphores as job dependencies for pending jobs
submitted from a wait thread.

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Melissa Wen d148379edf v3dv: wrap wait semaphores info in v3dv_submit_info_semaphores
Instead of pass pSubmit to queue_submit_cmd_buffer, create a struct
v3dv_submit_info_semaphores to wrap semaphores data from VkSubmitInfo.
In the next commit, this struct will help to handle wait condition for
jobs submitted in a wait event context, since we need to hold this
data when handle wait events and pass it to queue_submit_job() called
from wait threads. The main goal is to allow multiple wait semaphores
in a job submission. Later, this struct will be extended to include a
copy of signal semaphores too.

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Melissa Wen 09991fc47b v3dv: drop unused variable on handle_set_event_cpu_job
is_wait_thread is passed, but not actually used; and cpu_queue_handle_idle
is in charge to handle wait threads spawned before this one.

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13178>
2022-01-21 10:59:17 +00:00
Pierre-Eric Pelloux-Prayer 3b4d4c7d84 mesa: use less temporaries in build_lighting
Preallocating temporaries can cause "out of temporaries" error.
Switch to on-demand allocation.

Growing temp_in_use would be an alternative, but some drivers
support less than 64 temps (see PIPE_SHADER_CAP_MAX_TEMPS) so
this wouldn't help them.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5777
Fixes: 272acbed0e ("mesa: merge STATE_LIGHTPROD parameters")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14590>
2022-01-21 09:59:16 +00:00
Samuel Pitoiset b8c518f0fb radv: fix computing the number of color samples if no attachments
When no color attachments, the rasterization samples should be used.

Fixes: 0222dace90 ("radv: Support VK_KHR_dynamic_rendering for pipeline creation.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5830
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14642>
2022-01-21 09:38:37 +00:00
Pierre-Eric Pelloux-Prayer 4e4a2d0f97 driconf: enable vs_position_always_invariant for Dirt Rally
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5648
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14614>
2022-01-21 10:00:35 +01:00
Pavel Ondračka b5b105df96 r300: properly initialize new_vs in r300_draw_init_vertex_shader
Fixes the following valgrind warnings:
 Conditional jump or move depends on uninitialised value(s)
    at 0x5D1298C: draw_pt_so_emit_prepare (draw_pt_so_emit.c:95)
    by 0x5D89FD7: llvm_middle_end_prepare (draw_pt_fetch_shade_pipeline_llvm.c:319)
    by 0x5D13BFF: vsplit_prepare (draw_pt_vsplit.c:229)
    by 0x5D0D5D8: draw_pt_arrays.isra.0 (draw_pt.c:124)
    by 0x5D0DA08: draw_instances (draw_pt.c:484)
    by 0x5D0DEB9: draw_vbo (draw_pt.c:610)
    by 0x5E847D6: r300_swtcl_draw_vbo (r300_render.c:901)
    by 0x5D67125: u_vbuf_draw_vbo (u_vbuf.c:1470)
    by 0x5CFCAD3: cso_multi_draw (cso_context.c:1639)
    by 0x58FEC37: st_draw_gallium (st_draw.c:186)
    by 0x5A486BA: _mesa_draw_arrays.part.0 (draw.c:1323)
    by 0x48B4E27: stub_glDrawArrays (piglit-dispatch-gen.c:12421)
  Uninitialised value was created by a stack allocation
    at 0x5E90D3F: r300_draw_init_vertex_shader (r300_vs_draw.c:313)

 Conditional jump or move depends on uninitialised value(s)
    at 0x5D175D9: draw_create_vertex_shader (draw_vs.c:70)
    by 0x5E90E7A: r300_draw_init_vertex_shader (r300_vs_draw.c:366)
    by 0x5E8751F: r300_create_vs_state (r300_state.c:1950)
    by 0x594453B: st_create_common_variant (st_program.c:888)
    by 0x594720C: st_get_common_variant (st_program.c:973)
    by 0x59484B6: st_precompile_shader_variant (st_program.c:1994)
    by 0x59484B6: st_finalize_program (st_program.c:2056)
    by 0x58F0571: st_program_string_notify (st_cb_program.c:128)
    by 0x5928C9B: st_link_tgsi (st_glsl_to_tgsi.cpp:7514)
    by 0x5904B53: st_link_shader (st_glsl_to_ir.cpp:178)
    by 0x58D3E08: _mesa_glsl_link_shader (link_program.cpp:91)
    by 0x58865C7: link_program (shaderapi.c:1363)
    by 0x58865C7: link_program_error.part.0 (shaderapi.c:1474)
    by 0x48DBC5A: stub_glLinkProgram (piglit-dispatch-gen.c:34426)
  Uninitialised value was created by a stack allocation
    at 0x5E90D4F: r300_draw_init_vertex_shader (r300_vs_draw.c:313)

Based on Filip Gawin's
   r300: set new_vs.type to PIPE_SHADER_IR_TGSI

CC: mesa-stable
Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14620>
2022-01-21 03:35:29 +00:00
Dave Airlie 5decf569fc mesa/st: move perf query test to st_context, drop files.
This removes the unused cb perf query files

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:20 +00:00
Dave Airlie 3f8e7b8735 mesa/st: drop lots of perfquery wrappers
Just direct call into pipe driver.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00
Dave Airlie 78d13fdbb2 mesa/st: drop some bindless wrappers
Just call directly into pipe

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00
Dave Airlie 8467047f6d mesa/st: move memory query into mesa.
Drop the gl_memory_info type as it's equiv to the pipe one, and
internal

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00
Dave Airlie 6e99b10632 mesa/st: move shader completion into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00
Dave Airlie 03f180d88b mesa/st: inline st_max_shader_compiler_threads
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00
Dave Airlie 74d40c68dc mesa/ctx: store screen pointer in ctx as well
This is actually useful to have.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00
Dave Airlie df9d5795c1 mesa/st: move evaluate depth values into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00
Dave Airlie a64e5c02bd mesa/st/vdpau: direct call the vdpau functions.
This provides versions when vdpau is turned off, removes dd.h entries

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00
Dave Airlie 0f8a3a7175 mesa/st: drop release all sampler views wrapper
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00
Dave Airlie 31d3e3ebeb mesa/st: move st_TexParameter into mesa
Some places this just passes an always true pname, so just call
sampler view invalidate directly

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00
Dave Airlie 96b57faf35 mesa/st: drop useless tex parameter calls.
st_TexParameter never does anything for these

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00
Dave Airlie 9244c792f9 mesa/dd: drop GetProgramBinaryDriverSHA1
Just call direct into state tracker

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00
Dave Airlie 4a055c1940 mesa/st: move pin l3 cache to direct check/call.
Drop another dd.h entry

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>
2022-01-21 01:18:19 +00:00