...
 
Commits (69)
...@@ -11,6 +11,7 @@ include: ...@@ -11,6 +11,7 @@ include:
stages: stages:
- container+docs - container+docs
- container-2 - container-2
- deploy
- meson-x86_64 - meson-x86_64
- scons - scons
- meson-misc - meson-misc
...@@ -21,7 +22,6 @@ stages: ...@@ -21,7 +22,6 @@ stages:
- radv - radv
- lima - lima
- virgl - virgl
- deploy
- success - success
.docs-base: .docs-base:
...@@ -43,7 +43,7 @@ pages: ...@@ -43,7 +43,7 @@ pages:
changes: &docs-or-ci changes: &docs-or-ci
- docs/**/* - docs/**/*
- .gitlab-ci.yml - .gitlab-ci.yml
when: on_success when: always
# Other cases default to never # Other cases default to never
test-docs: test-docs:
...@@ -366,7 +366,7 @@ arm64_test: ...@@ -366,7 +366,7 @@ arm64_test:
WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG" WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG"
WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows/x64_build:$WINDOWS_TAG" WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows/x64_build:$WINDOWS_TAG"
windows_build_vs2019: .windows_build_vs2019:
extends: extends:
- .container - .container
- .windows-docker-vs2019 - .windows-docker-vs2019
...@@ -591,7 +591,7 @@ meson-clang: ...@@ -591,7 +591,7 @@ meson-clang:
CC: "ccache clang-9" CC: "ccache clang-9"
CXX: "ccache clang++-9" CXX: "ccache clang++-9"
meson-windows-vs2019: .meson-windows-vs2019:
extends: extends:
- .build-windows - .build-windows
- .use-windows_build_vs2019 - .use-windows_build_vs2019
......
...@@ -27,12 +27,6 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide ...@@ -27,12 +27,6 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide
dEQP-VK.rasterization.interpolation.projected.lines_wide dEQP-VK.rasterization.interpolation.projected.lines_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.non_strict_lines_wide
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bvec3 dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bvec3
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bvec3_requiredsubgroupsize64 dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bvec3_requiredsubgroupsize64
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_dvec3 dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_dvec3
......
...@@ -13,9 +13,3 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide ...@@ -13,9 +13,3 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide
dEQP-VK.rasterization.interpolation.projected.lines_wide dEQP-VK.rasterization.interpolation.projected.lines_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.non_strict_lines_wide
...@@ -13,9 +13,3 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide ...@@ -13,9 +13,3 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide
dEQP-VK.rasterization.interpolation.projected.lines_wide dEQP-VK.rasterization.interpolation.projected.lines_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.non_strict_lines_wide
...@@ -11,12 +11,6 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide ...@@ -11,12 +11,6 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide
dEQP-VK.rasterization.interpolation.projected.lines_wide dEQP-VK.rasterization.interpolation.projected.lines_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.non_strict_lines_wide
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bvec3 dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bvec3
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bvec3_requiredsubgroupsize64 dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bvec3_requiredsubgroupsize64
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_dvec3 dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_dvec3
......
...@@ -7,12 +7,6 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide ...@@ -7,12 +7,6 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide
dEQP-VK.rasterization.interpolation.projected.lines_wide dEQP-VK.rasterization.interpolation.projected.lines_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.non_strict_lines_wide
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bvec3 dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bvec3
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bvec3_requiredsubgroupsize64 dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_bvec3_requiredsubgroupsize64
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_dvec3 dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_dvec3
......
...@@ -13,9 +13,3 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide ...@@ -13,9 +13,3 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide
dEQP-VK.rasterization.interpolation.projected.lines_wide dEQP-VK.rasterization.interpolation.projected.lines_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.non_strict_lines_wide
...@@ -11,9 +11,3 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide ...@@ -11,9 +11,3 @@ dEQP-VK.rasterization.interpolation.basic.non_strict_lines_wide
dEQP-VK.rasterization.interpolation.projected.lines_wide dEQP-VK.rasterization.interpolation.projected.lines_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide dEQP-VK.rasterization.interpolation.projected.non_strict_line_strip_wide
dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide dEQP-VK.rasterization.interpolation.projected.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_2_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_4_bit.non_strict_lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.lines_wide
dEQP-VK.rasterization.interpolation_multisample_8_bit.non_strict_lines_wide
This diff is collapsed.
...@@ -103,23 +103,20 @@ KHR-GL30.transform_feedback.get_xfb_varying ...@@ -103,23 +103,20 @@ KHR-GL30.transform_feedback.get_xfb_varying
KHR-GL30.transform_feedback.query_vertex_interleaved_test KHR-GL30.transform_feedback.query_vertex_interleaved_test
KHR-GL30.transform_feedback.query_vertex_separate_test KHR-GL30.transform_feedback.query_vertex_separate_test
KHR-GL31.CommonBugs.CommonBug_ParenthesisInLayoutQualifierIntegerValue KHR-GL31.CommonBugs.CommonBug_ParenthesisInLayoutQualifierIntegerValue
KHR-GL31.transform_feedback.api_errors_test
KHR-GL31.transform_feedback.capture_vertex_interleaved_test KHR-GL31.transform_feedback.capture_vertex_interleaved_test
KHR-GL31.transform_feedback.capture_vertex_separate_test KHR-GL31.transform_feedback.capture_vertex_separate_test
KHR-GL31.transform_feedback.discard_vertex_test KHR-GL31.transform_feedback.discard_vertex_test
KHR-GL31.transform_feedback.draw_xfb_instanced_test KHR-GL31.transform_feedback.draw_xfb_instanced_test
KHR-GL32.transform_feedback.draw_xfb_stream_test
KHR-GL31.transform_feedback.draw_xfb_stream_instanced_test KHR-GL31.transform_feedback.draw_xfb_stream_instanced_test
KHR-GL31.transform_feedback.query_vertex_interleaved_test KHR-GL31.transform_feedback.query_vertex_interleaved_test
KHR-GL31.transform_feedback.query_vertex_separate_test KHR-GL31.transform_feedback.query_vertex_separate_test
KHR-GL32.CommonBugs.CommonBug_ParenthesisInLayoutQualifierIntegerValue KHR-GL32.CommonBugs.CommonBug_ParenthesisInLayoutQualifierIntegerValue
KHR-GL32.gpu_shader5_gl.float_encoding
KHR-GL32.gpu_shader5_gl.function_overloading
KHR-GL32.gpu_shader5_gl.implicit_conversions
KHR-GL32.transform_feedback.api_errors_test
KHR-GL32.transform_feedback.capture_vertex_interleaved_test KHR-GL32.transform_feedback.capture_vertex_interleaved_test
KHR-GL32.transform_feedback.capture_vertex_separate_test KHR-GL32.transform_feedback.capture_vertex_separate_test
KHR-GL32.transform_feedback.discard_vertex_test KHR-GL32.transform_feedback.discard_vertex_test
KHR-GL32.transform_feedback.draw_xfb_instanced_test KHR-GL32.transform_feedback.draw_xfb_instanced_test
KHR-GL32.transform_feedback.draw_xfb_stream_test
KHR-GL32.transform_feedback.draw_xfb_stream_instanced_test KHR-GL32.transform_feedback.draw_xfb_stream_instanced_test
KHR-GL32.transform_feedback_overflow_query_ARB.advanced-single-stream-interleaved-attribs KHR-GL32.transform_feedback_overflow_query_ARB.advanced-single-stream-interleaved-attribs
KHR-GL32.transform_feedback_overflow_query_ARB.advanced-single-stream-separate-attribs KHR-GL32.transform_feedback_overflow_query_ARB.advanced-single-stream-separate-attribs
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -27,12 +27,13 @@ traces: ...@@ -27,12 +27,13 @@ traces:
# expectations: # expectations:
# - device: freedreno-a630 # - device: freedreno-a630
# checksum: 0 # checksum: 0
- path: gputest/pixmark-piano.trace # Intermittent GPU hangs on a630 result in test failures for this.
expectations: # - path: gputest/pixmark-piano.trace
# One of the material textures appears brighter on freedreno than # expectations:
# i965 in a way that is probably wrong. # # One of the material textures appears brighter on freedreno than
- device: freedreno-a630 # # i965 in a way that is probably wrong.
checksum: 1aad6e1ffe23cae71acdb70695a6184b # - device: freedreno-a630
# checksum: 1aad6e1ffe23cae71acdb70695a6184b
- path: gputest/pixmark-volplosion.trace - path: gputest/pixmark-volplosion.trace
expectations: expectations:
# Looks fine, but totally different shape from the rendering on i965. # Looks fine, but totally different shape from the rendering on i965.
......
...@@ -111,10 +111,10 @@ GL 3.3, GLSL 3.30 --- all DONE: i965, nv50, nvc0, r600, radeonsi, llvmpipe, soft ...@@ -111,10 +111,10 @@ GL 3.3, GLSL 3.30 --- all DONE: i965, nv50, nvc0, r600, radeonsi, llvmpipe, soft
GL_ARB_vertex_type_2_10_10_10_rev DONE (freedreno, swr, v3d) GL_ARB_vertex_type_2_10_10_10_rev DONE (freedreno, swr, v3d)
GL 4.0, GLSL 4.00 --- all DONE: i965/gen7+, nvc0, r600, radeonsi, virgl GL 4.0, GLSL 4.00 --- all DONE: i965/gen7+, nvc0, r600, radeonsi, llvmpipe, virgl
GL_ARB_draw_buffers_blend DONE (freedreno, i965/gen6+, nv50, llvmpipe, softpipe, swr, zink) GL_ARB_draw_buffers_blend DONE (freedreno, i965/gen6+, nv50, softpipe, swr, zink)
GL_ARB_draw_indirect DONE (freedreno, i965/gen7+, llvmpipe, softpipe, swr, v3d) GL_ARB_draw_indirect DONE (freedreno, i965/gen7+, softpipe, swr, v3d)
GL_ARB_gpu_shader5 DONE (i965/gen7+) GL_ARB_gpu_shader5 DONE (i965/gen7+)
- 'precise' qualifier DONE (softpipe) - 'precise' qualifier DONE (softpipe)
- Dynamically uniform sampler array indices DONE (softpipe) - Dynamically uniform sampler array indices DONE (softpipe)
...@@ -123,21 +123,21 @@ GL 4.0, GLSL 4.00 --- all DONE: i965/gen7+, nvc0, r600, radeonsi, virgl ...@@ -123,21 +123,21 @@ GL 4.0, GLSL 4.00 --- all DONE: i965/gen7+, nvc0, r600, radeonsi, virgl
- Fused multiply-add DONE (softpipe, swr) - Fused multiply-add DONE (softpipe, swr)
- Packing/bitfield/conversion functions DONE (freedreno, softpipe, swr) - Packing/bitfield/conversion functions DONE (freedreno, softpipe, swr)
- Enhanced textureGather DONE (freedreno, softpipe, swr) - Enhanced textureGather DONE (freedreno, softpipe, swr)
- Geometry shader instancing DONE (llvmpipe, softpipe, swr) - Geometry shader instancing DONE (softpipe, swr)
- Geometry shader multiple streams DONE (softpipe, swr) - Geometry shader multiple streams DONE (softpipe, swr)
- Enhanced per-sample shading DONE () - Enhanced per-sample shading DONE ()
- Interpolation functions DONE (softpipe) - Interpolation functions DONE (softpipe)
- New overload resolution rules DONE (softpipe) - New overload resolution rules DONE (softpipe)
GL_ARB_gpu_shader_fp64 DONE (i965/gen7+, llvmpipe, softpipe, swr) GL_ARB_gpu_shader_fp64 DONE (i965/gen7+, softpipe, swr)
GL_ARB_sample_shading DONE (freedreno/a6xx, i965/gen6+, nv50, llvmpipe) GL_ARB_sample_shading DONE (freedreno/a6xx, i965/gen6+, nv50)
GL_ARB_shader_subroutine DONE (freedreno, i965/gen6+, nv50, llvmpipe, softpipe, swr) GL_ARB_shader_subroutine DONE (freedreno, i965/gen6+, nv50, softpipe, swr)
GL_ARB_tessellation_shader DONE (i965/gen7+, llvmpipe, swr) GL_ARB_tessellation_shader DONE (i965/gen7+, swr)
GL_ARB_texture_buffer_object_rgb32 DONE (freedreno, i965/gen6+, llvmpipe, softpipe, swr) GL_ARB_texture_buffer_object_rgb32 DONE (freedreno, i965/gen6+, softpipe, swr)
GL_ARB_texture_cube_map_array DONE (i965/gen6+, nv50, llvmpipe, softpipe, swr, zink) GL_ARB_texture_cube_map_array DONE (i965/gen6+, nv50, softpipe, swr, zink)
GL_ARB_texture_gather DONE (freedreno, i965/gen6+, nv50, llvmpipe, softpipe, swr, v3d) GL_ARB_texture_gather DONE (freedreno, i965/gen6+, nv50, softpipe, swr, v3d)
GL_ARB_texture_query_lod DONE (freedreno, i965, nv50, llvmpipe, softpipe, swr, v3d) GL_ARB_texture_query_lod DONE (freedreno, i965, nv50, softpipe, swr, v3d)
GL_ARB_transform_feedback2 DONE (i965/gen6+, nv50, llvmpipe, softpipe, swr, v3d) GL_ARB_transform_feedback2 DONE (i965/gen6+, nv50, softpipe, swr, v3d)
GL_ARB_transform_feedback3 DONE (i965/gen7+, llvmpipe, softpipe, swr) GL_ARB_transform_feedback3 DONE (i965/gen7+, softpipe, swr)
GL 4.1, GLSL 4.10 --- all DONE: i965/gen7+, nvc0, r600, radeonsi, virgl GL 4.1, GLSL 4.10 --- all DONE: i965/gen7+, nvc0, r600, radeonsi, virgl
......
GL_ARB_compute_variable_group_size on Iris. GL_ARB_compute_variable_group_size on Iris.
GL_ARB_gpu_shader5 on llvmpipe
GL 4.0 on llvmpipe
GL_EXT_shader_group_vote on GLES3. GL_EXT_shader_group_vote on GLES3.
VK_AMD_texture_gather_bias_lod on RADV. VK_AMD_texture_gather_bias_lod on RADV.
VK_AMD_gpu_shader_half_float on RADV/ACO. VK_AMD_gpu_shader_half_float on RADV/ACO.
......
...@@ -422,7 +422,7 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat ...@@ -422,7 +422,7 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat
endif endif
# Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS. # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
if host_machine.system() != 'windows' and (not with_platform_android or get_option('platform-sdk-version') >= 29) if not ['windows', 'freebsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
pre_args += '-DUSE_ELF_TLS' pre_args += '-DUSE_ELF_TLS'
endif endif
......
...@@ -1266,7 +1266,7 @@ radv_emit_line_width(struct radv_cmd_buffer *cmd_buffer) ...@@ -1266,7 +1266,7 @@ radv_emit_line_width(struct radv_cmd_buffer *cmd_buffer)
unsigned width = cmd_buffer->state.dynamic.line_width * 8; unsigned width = cmd_buffer->state.dynamic.line_width * 8;
radeon_set_context_reg(cmd_buffer->cs, R_028A08_PA_SU_LINE_CNTL, radeon_set_context_reg(cmd_buffer->cs, R_028A08_PA_SU_LINE_CNTL,
S_028A08_WIDTH(CLAMP(width, 0, 0xFFF))); S_028A08_WIDTH(CLAMP(width, 0, 0xFFFF)));
} }
static void static void
......
...@@ -586,6 +586,7 @@ DRI_CONF_BEGIN ...@@ -586,6 +586,7 @@ DRI_CONF_BEGIN
DRI_CONF_ADAPTIVE_SYNC("true") DRI_CONF_ADAPTIVE_SYNC("true")
DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0) DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0)
DRI_CONF_VK_X11_STRICT_IMAGE_COUNT("false") DRI_CONF_VK_X11_STRICT_IMAGE_COUNT("false")
DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT("false")
DRI_CONF_RADV_REPORT_LLVM9_VERSION_STRING("false") DRI_CONF_RADV_REPORT_LLVM9_VERSION_STRING("false")
DRI_CONF_RADV_ENABLE_MRT_OUTPUT_NAN_FIXUP("false") DRI_CONF_RADV_ENABLE_MRT_OUTPUT_NAN_FIXUP("false")
DRI_CONF_RADV_NO_DYNAMIC_BOUNDS("false") DRI_CONF_RADV_NO_DYNAMIC_BOUNDS("false")
...@@ -1467,8 +1468,8 @@ void radv_GetPhysicalDeviceProperties( ...@@ -1467,8 +1468,8 @@ void radv_GetPhysicalDeviceProperties(
.maxCullDistances = 8, .maxCullDistances = 8,
.maxCombinedClipAndCullDistances = 8, .maxCombinedClipAndCullDistances = 8,
.discreteQueuePriorities = 2, .discreteQueuePriorities = 2,
.pointSizeRange = { 0.0, 8192.0 }, .pointSizeRange = { 0.0, 8191.875 },
.lineWidthRange = { 0.0, 8192.0 }, .lineWidthRange = { 0.0, 8191.875 },
.pointSizeGranularity = (1.0 / 8.0), .pointSizeGranularity = (1.0 / 8.0),
.lineWidthGranularity = (1.0 / 8.0), .lineWidthGranularity = (1.0 / 8.0),
.strictLines = false, /* FINISHME */ .strictLines = false, /* FINISHME */
......
...@@ -1154,7 +1154,6 @@ radv_pipeline_init_multisample_state(struct radv_pipeline *pipeline, ...@@ -1154,7 +1154,6 @@ radv_pipeline_init_multisample_state(struct radv_pipeline *pipeline,
unsigned log_z_samples = util_logbase2(z_samples); unsigned log_z_samples = util_logbase2(z_samples);
unsigned log_ps_iter_samples = util_logbase2(ps_iter_samples); unsigned log_ps_iter_samples = util_logbase2(ps_iter_samples);
ms->pa_sc_mode_cntl_0 |= S_028A48_MSAA_ENABLE(1); ms->pa_sc_mode_cntl_0 |= S_028A48_MSAA_ENABLE(1);
ms->pa_sc_line_cntl |= S_028BDC_EXPAND_LINE_WIDTH(1); /* CM_R_028BDC_PA_SC_LINE_CNTL */
ms->db_eqaa |= S_028804_MAX_ANCHOR_SAMPLES(log_z_samples) | ms->db_eqaa |= S_028804_MAX_ANCHOR_SAMPLES(log_z_samples) |
S_028804_PS_ITER_SAMPLES(log_ps_iter_samples) | S_028804_PS_ITER_SAMPLES(log_ps_iter_samples) |
S_028804_MASK_EXPORT_NUM_SAMPLES(log_samples) | S_028804_MASK_EXPORT_NUM_SAMPLES(log_samples) |
......
...@@ -484,7 +484,7 @@ si_emit_graphics(struct radv_device *device, ...@@ -484,7 +484,7 @@ si_emit_graphics(struct radv_device *device,
radeon_emit(cs, S_028A00_HEIGHT(tmp) | S_028A00_WIDTH(tmp)); radeon_emit(cs, S_028A00_HEIGHT(tmp) | S_028A00_WIDTH(tmp));
radeon_set_context_reg_seq(cs, R_028A04_PA_SU_POINT_MINMAX, 1); radeon_set_context_reg_seq(cs, R_028A04_PA_SU_POINT_MINMAX, 1);
radeon_emit(cs, S_028A04_MIN_SIZE(radv_pack_float_12p4(0)) | radeon_emit(cs, S_028A04_MIN_SIZE(radv_pack_float_12p4(0)) |
S_028A04_MAX_SIZE(radv_pack_float_12p4(8192/2))); S_028A04_MAX_SIZE(radv_pack_float_12p4(8191.875/2)));
if (!has_clear_state) { if (!has_clear_state) {
radeon_set_context_reg(cs, R_028004_DB_COUNT_CONTROL, radeon_set_context_reg(cs, R_028004_DB_COUNT_CONTROL,
......
...@@ -120,6 +120,7 @@ gather_intrinsic(struct access_state *state, nir_intrinsic_instr *instr) ...@@ -120,6 +120,7 @@ gather_intrinsic(struct access_state *state, nir_intrinsic_instr *instr)
_mesa_set_add(state->vars_written, var); _mesa_set_add(state->vars_written, var);
state->buffers_written = true; state->buffers_written = true;
break;
case nir_intrinsic_memory_barrier: case nir_intrinsic_memory_barrier:
state->buffer_barriers = true; state->buffer_barriers = true;
......
...@@ -239,8 +239,8 @@ _eglQueryDeviceStringEXT(_EGLDevice *dev, EGLint name) ...@@ -239,8 +239,8 @@ _eglQueryDeviceStringEXT(_EGLDevice *dev, EGLint name)
case EGL_DRM_DEVICE_FILE_EXT: case EGL_DRM_DEVICE_FILE_EXT:
if (_eglDeviceSupports(dev, _EGL_DEVICE_DRM)) if (_eglDeviceSupports(dev, _EGL_DEVICE_DRM))
return dev->device->nodes[DRM_NODE_PRIMARY]; return dev->device->nodes[DRM_NODE_PRIMARY];
/* fall through */
#endif #endif
/* fall through */
default: default:
_eglError(EGL_BAD_PARAMETER, "eglQueryDeviceStringEXT"); _eglError(EGL_BAD_PARAMETER, "eglQueryDeviceStringEXT");
return NULL; return NULL;
......
...@@ -2032,9 +2032,10 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) ...@@ -2032,9 +2032,10 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
fake_buf_ptr = LLVMBuildGEP(builder, fake_buf, &bld.zero, 1, ""); fake_buf_ptr = LLVMBuildGEP(builder, fake_buf, &bld.zero, 1, "");
/* code generated texture sampling */ /* code generated texture sampling */
sampler = draw_llvm_sampler_soa_create(draw_llvm_variant_key_samplers(key)); sampler = draw_llvm_sampler_soa_create(draw_llvm_variant_key_samplers(key), key->nr_samplers);
image = draw_llvm_image_soa_create(draw_llvm_variant_key_images(key)); image = draw_llvm_image_soa_create(draw_llvm_variant_key_images(key),
key->nr_images);
step = lp_build_const_int32(gallivm, vector_length); step = lp_build_const_int32(gallivm, vector_length);
...@@ -2821,8 +2822,9 @@ draw_gs_llvm_generate(struct draw_llvm *llvm, ...@@ -2821,8 +2822,9 @@ draw_gs_llvm_generate(struct draw_llvm *llvm,
draw_gs_jit_context_num_ssbos(variant->gallivm, context_ptr); draw_gs_jit_context_num_ssbos(variant->gallivm, context_ptr);
/* code generated texture sampling */ /* code generated texture sampling */
sampler = draw_llvm_sampler_soa_create(variant->key.samplers); sampler = draw_llvm_sampler_soa_create(variant->key.samplers, variant->key.nr_samplers);
image = draw_llvm_image_soa_create(draw_gs_llvm_variant_key_images(&variant->key)); image = draw_llvm_image_soa_create(draw_gs_llvm_variant_key_images(&variant->key),
variant->key.nr_images);
mask_val = generate_mask_value(variant, gs_type); mask_val = generate_mask_value(variant, gs_type);
lp_build_mask_begin(&mask, gallivm, gs_type, mask_val); lp_build_mask_begin(&mask, gallivm, gs_type, mask_val);
...@@ -3429,8 +3431,9 @@ draw_tcs_llvm_generate(struct draw_llvm *llvm, ...@@ -3429,8 +3431,9 @@ draw_tcs_llvm_generate(struct draw_llvm *llvm,
ssbos_ptr = draw_tcs_jit_context_ssbos(variant->gallivm, context_ptr); ssbos_ptr = draw_tcs_jit_context_ssbos(variant->gallivm, context_ptr);
num_ssbos_ptr = num_ssbos_ptr =
draw_tcs_jit_context_num_ssbos(variant->gallivm, context_ptr); draw_tcs_jit_context_num_ssbos(variant->gallivm, context_ptr);
sampler = draw_llvm_sampler_soa_create(variant->key.samplers); sampler = draw_llvm_sampler_soa_create(variant->key.samplers, variant->key.nr_samplers);
image = draw_llvm_image_soa_create(draw_tcs_llvm_variant_key_images(&variant->key)); image = draw_llvm_image_soa_create(draw_tcs_llvm_variant_key_images(&variant->key),
variant->key.nr_images);
LLVMValueRef counter = LLVMGetParam(variant_coro, 5); LLVMValueRef counter = LLVMGetParam(variant_coro, 5);
LLVMValueRef invocvec = LLVMGetUndef(LLVMVectorType(int32_type, vector_length)); LLVMValueRef invocvec = LLVMGetUndef(LLVMVectorType(int32_type, vector_length));
...@@ -3926,8 +3929,9 @@ draw_tes_llvm_generate(struct draw_llvm *llvm, ...@@ -3926,8 +3929,9 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
ssbos_ptr = draw_tes_jit_context_ssbos(variant->gallivm, context_ptr); ssbos_ptr = draw_tes_jit_context_ssbos(variant->gallivm, context_ptr);
num_ssbos_ptr = num_ssbos_ptr =
draw_tes_jit_context_num_ssbos(variant->gallivm, context_ptr); draw_tes_jit_context_num_ssbos(variant->gallivm, context_ptr);
sampler = draw_llvm_sampler_soa_create(variant->key.samplers); sampler = draw_llvm_sampler_soa_create(variant->key.samplers, variant->key.nr_samplers);
image = draw_llvm_image_soa_create(draw_tes_llvm_variant_key_images(&variant->key)); image = draw_llvm_image_soa_create(draw_tes_llvm_variant_key_images(&variant->key),
variant->key.nr_images);
step = lp_build_const_int32(gallivm, vector_length); step = lp_build_const_int32(gallivm, vector_length);
system_values.tess_outer = LLVMBuildLoad(builder, tess_outer, ""); system_values.tess_outer = LLVMBuildLoad(builder, tess_outer, "");
......
...@@ -890,10 +890,12 @@ void ...@@ -890,10 +890,12 @@ void
draw_tes_llvm_dump_variant_key(struct draw_tes_llvm_variant_key *key); draw_tes_llvm_dump_variant_key(struct draw_tes_llvm_variant_key *key);
struct lp_build_sampler_soa * struct lp_build_sampler_soa *
draw_llvm_sampler_soa_create(const struct draw_sampler_static_state *static_state); draw_llvm_sampler_soa_create(const struct draw_sampler_static_state *static_state,
unsigned nr_samplers);
struct lp_build_image_soa * struct lp_build_image_soa *
draw_llvm_image_soa_create(const struct draw_image_static_state *static_state); draw_llvm_image_soa_create(const struct draw_image_static_state *static_state,
unsigned nr_images);
void void
draw_llvm_set_sampler_state(struct draw_context *draw, draw_llvm_set_sampler_state(struct draw_context *draw,
......
...@@ -70,6 +70,8 @@ struct draw_llvm_sampler_soa ...@@ -70,6 +70,8 @@ struct draw_llvm_sampler_soa
struct lp_build_sampler_soa base; struct lp_build_sampler_soa base;
struct draw_llvm_sampler_dynamic_state dynamic_state; struct draw_llvm_sampler_dynamic_state dynamic_state;
unsigned nr_samplers;
}; };
struct draw_llvm_image_dynamic_state struct draw_llvm_image_dynamic_state
...@@ -84,6 +86,8 @@ struct draw_llvm_image_soa ...@@ -84,6 +86,8 @@ struct draw_llvm_image_soa
struct lp_build_image_soa base; struct lp_build_image_soa base;
struct draw_llvm_image_dynamic_state dynamic_state; struct draw_llvm_image_dynamic_state dynamic_state;
unsigned nr_images;
}; };
/** /**
...@@ -99,6 +103,7 @@ draw_llvm_texture_member(const struct lp_sampler_dynamic_state *base, ...@@ -99,6 +103,7 @@ draw_llvm_texture_member(const struct lp_sampler_dynamic_state *base,
struct gallivm_state *gallivm, struct gallivm_state *gallivm,
LLVMValueRef context_ptr, LLVMValueRef context_ptr,
unsigned texture_unit, unsigned texture_unit,
LLVMValueRef texture_unit_offset,
unsigned member_index, unsigned member_index,
const char *member_name, const char *member_name,
boolean emit_load) boolean emit_load)
...@@ -116,6 +121,11 @@ draw_llvm_texture_member(const struct lp_sampler_dynamic_state *base, ...@@ -116,6 +121,11 @@ draw_llvm_texture_member(const struct lp_sampler_dynamic_state *base,
indices[1] = lp_build_const_int32(gallivm, DRAW_JIT_CTX_TEXTURES); indices[1] = lp_build_const_int32(gallivm, DRAW_JIT_CTX_TEXTURES);
/* context[0].textures[unit] */ /* context[0].textures[unit] */
indices[2] = lp_build_const_int32(gallivm, texture_unit); indices[2] = lp_build_const_int32(gallivm, texture_unit);
if (texture_unit_offset) {
indices[2] = LLVMBuildAdd(gallivm->builder, indices[2], texture_unit_offset, "");
LLVMValueRef cond = LLVMBuildICmp(gallivm->builder, LLVMIntULT, indices[2], lp_build_const_int32(gallivm, PIPE_MAX_SHADER_SAMPLER_VIEWS), "");
indices[2] = LLVMBuildSelect(gallivm->builder, cond, indices[2], lp_build_const_int32(gallivm, texture_unit), "");
}
/* context[0].textures[unit].member */ /* context[0].textures[unit].member */
indices[3] = lp_build_const_int32(gallivm, member_index); indices[3] = lp_build_const_int32(gallivm, member_index);
...@@ -190,6 +200,7 @@ draw_llvm_image_member(const struct lp_sampler_dynamic_state *base, ...@@ -190,6 +200,7 @@ draw_llvm_image_member(const struct lp_sampler_dynamic_state *base,
struct gallivm_state *gallivm, struct gallivm_state *gallivm,
LLVMValueRef context_ptr, LLVMValueRef context_ptr,
unsigned image_unit, unsigned image_unit,
LLVMValueRef image_unit_offset,
unsigned member_index, unsigned member_index,
const char *member_name, const char *member_name,
boolean emit_load) boolean emit_load)
...@@ -207,6 +218,11 @@ draw_llvm_image_member(const struct lp_sampler_dynamic_state *base, ...@@ -207,6 +218,11 @@ draw_llvm_image_member(const struct lp_sampler_dynamic_state *base,
indices[1] = lp_build_const_int32(gallivm, DRAW_JIT_CTX_IMAGES); indices[1] = lp_build_const_int32(gallivm, DRAW_JIT_CTX_IMAGES);
/* context[0].textures[unit] */ /* context[0].textures[unit] */
indices[2] = lp_build_const_int32(gallivm, image_unit); indices[2] = lp_build_const_int32(gallivm, image_unit);
if (image_unit_offset) {
indices[2] = LLVMBuildAdd(gallivm->builder, indices[2], image_unit_offset, "");
LLVMValueRef cond = LLVMBuildICmp(gallivm->builder, LLVMIntULT, indices[2], lp_build_const_int32(gallivm, PIPE_MAX_SHADER_IMAGES), "");
indices[2] = LLVMBuildSelect(gallivm->builder, cond, indices[2], lp_build_const_int32(gallivm, image_unit), "");
}
/* context[0].textures[unit].member */ /* context[0].textures[unit].member */
indices[3] = lp_build_const_int32(gallivm, member_index); indices[3] = lp_build_const_int32(gallivm, member_index);
...@@ -236,10 +252,12 @@ draw_llvm_image_member(const struct lp_sampler_dynamic_state *base, ...@@ -236,10 +252,12 @@ draw_llvm_image_member(const struct lp_sampler_dynamic_state *base,
draw_llvm_texture_##_name( const struct lp_sampler_dynamic_state *base, \ draw_llvm_texture_##_name( const struct lp_sampler_dynamic_state *base, \
struct gallivm_state *gallivm, \ struct gallivm_state *gallivm, \
LLVMValueRef context_ptr, \ LLVMValueRef context_ptr, \
unsigned texture_unit) \ unsigned texture_unit, \
LLVMValueRef texture_unit_offset) \
{ \ { \
return draw_llvm_texture_member(base, gallivm, context_ptr, \ return draw_llvm_texture_member(base, gallivm, context_ptr, \
texture_unit, _index, #_name, _emit_load ); \ texture_unit, texture_unit_offset, \
_index, #_name, _emit_load ); \
} }
...@@ -275,12 +293,13 @@ DRAW_LLVM_SAMPLER_MEMBER(border_color, DRAW_JIT_SAMPLER_BORDER_COLOR, FALSE) ...@@ -275,12 +293,13 @@ DRAW_LLVM_SAMPLER_MEMBER(border_color, DRAW_JIT_SAMPLER_BORDER_COLOR, FALSE)
#define DRAW_LLVM_IMAGE_MEMBER(_name, _index, _emit_load) \ #define DRAW_LLVM_IMAGE_MEMBER(_name, _index, _emit_load) \
static LLVMValueRef \ static LLVMValueRef \
draw_llvm_image_##_name( const struct lp_sampler_dynamic_state *base, \ draw_llvm_image_##_name( const struct lp_sampler_dynamic_state *base, \
struct gallivm_state *gallivm, \ struct gallivm_state *gallivm, \
LLVMValueRef context_ptr, \ LLVMValueRef context_ptr, \
unsigned image_unit) \ unsigned image_unit, LLVMValueRef image_unit_offset) \
{ \ { \
return draw_llvm_image_member(base, gallivm, context_ptr, \ return draw_llvm_image_member(base, gallivm, context_ptr, \
image_unit, _index, #_name, _emit_load ); \ image_unit, image_unit_offset, \
_index, #_name, _emit_load ); \
} }
...@@ -316,10 +335,27 @@ draw_llvm_sampler_soa_emit_fetch_texel(const struct lp_build_sampler_soa *base, ...@@ -316,10 +335,27 @@ draw_llvm_sampler_soa_emit_fetch_texel(const struct lp_build_sampler_soa *base,
assert(texture_index < PIPE_MAX_SHADER_SAMPLER_VIEWS); assert(texture_index < PIPE_MAX_SHADER_SAMPLER_VIEWS);
assert(sampler_index < PIPE_MAX_SAMPLERS); assert(sampler_index < PIPE_MAX_SAMPLERS);
lp_build_sample_soa(&sampler->dynamic_state.static_state[texture_index].texture_state, if (params->texture_index_offset) {
&sampler->dynamic_state.static_state[sampler_index].sampler_state, struct lp_build_sample_array_switch switch_info;
&sampler->dynamic_state.base, memset(&switch_info, 0, sizeof(switch_info));
gallivm, params); LLVMValueRef unit = LLVMBuildAdd(gallivm->builder, params->texture_index_offset,
lp_build_const_int32(gallivm, texture_index), "");
lp_build_sample_array_init_soa(&switch_info, gallivm, params, unit,
0, sampler->nr_samplers);
for (unsigned i = 0; i < sampler->nr_samplers; i++) {
lp_build_sample_array_case_soa(&switch_info, i,
&sampler->dynamic_state.static_state[i].texture_state,
&sampler->dynamic_state.static_state[i].sampler_state,
&sampler->dynamic_state.base);
}
lp_build_sample_array_fini_soa(&switch_info);
} else {
lp_build_sample_soa(&sampler->dynamic_state.static_state[texture_index].texture_state,
&sampler->dynamic_state.static_state[sampler_index].sampler_state,
&sampler->dynamic_state.base,
gallivm, params);
}
} }
...@@ -342,7 +378,8 @@ draw_llvm_sampler_soa_emit_size_query(const struct lp_build_sampler_soa *base, ...@@ -342,7 +378,8 @@ draw_llvm_sampler_soa_emit_size_query(const struct lp_build_sampler_soa *base,
} }
struct lp_build_sampler_soa * struct lp_build_sampler_soa *
draw_llvm_sampler_soa_create(const struct draw_sampler_static_state *static_state) draw_llvm_sampler_soa_create(const struct draw_sampler_static_state *static_state,
unsigned nr_samplers)
{ {
struct draw_llvm_sampler_soa *sampler; struct draw_llvm_sampler_soa *sampler;
...@@ -370,6 +407,7 @@ draw_llvm_sampler_soa_create(const struct draw_sampler_static_state *static_stat ...@@ -370,6 +407,7 @@ draw_llvm_sampler_soa_create(const struct draw_sampler_static_state *static_stat
sampler->dynamic_state.base.border_color = draw_llvm_sampler_border_color; sampler->dynamic_state.base.border_color = draw_llvm_sampler_border_color;
sampler->dynamic_state.static_state = static_state; sampler->dynamic_state.static_state = static_state;
sampler->nr_samplers = nr_samplers;
return &sampler->base; return &sampler->base;
} }
...@@ -382,9 +420,25 @@ draw_llvm_image_soa_emit_op(const struct lp_build_image_soa *base, ...@@ -382,9 +420,25 @@ draw_llvm_image_soa_emit_op(const struct lp_build_image_soa *base,
unsigned image_index = params->image_index; unsigned image_index = params->image_index;
assert(image_index < PIPE_MAX_SHADER_IMAGES); assert(image_index < PIPE_MAX_SHADER_IMAGES);
if (params->image_index_offset) {
struct lp_build_img_op_array_switch switch_info;
memset(&switch_info, 0, sizeof(switch_info));
LLVMValueRef unit = LLVMBuildAdd(gallivm->builder, params->image_index_offset,
lp_build_const_int32(gallivm, image_index), "");
lp_build_image_op_switch_soa(&switch_info, gallivm, params,
unit, 0, image->nr_images);
for (unsigned i = 0; i < image->nr_images; i++) {
lp_build_image_op_array_case(&switch_info, i,
&image->dynamic_state.static_state[i].image_state,
&image->dynamic_state.base);
}
lp_build_image_op_array_fini_soa(&switch_info);
return;
}
lp_build_img_op_soa(&image->dynamic_state.static_state[image_index].image_state, lp_build_img_op_soa(&image->dynamic_state.static_state[image_index].image_state,
&image->dynamic_state.base, &image->dynamic_state.base,
gallivm, params); gallivm, params, params->outdata);
} }
/** /**
* Fetch the texture size. * Fetch the texture size.
...@@ -410,7 +464,8 @@ draw_llvm_image_soa_destroy(struct lp_build_image_soa *image) ...@@ -410,7 +464,8 @@ draw_llvm_image_soa_destroy(struct lp_build_image_soa *image)
} }
struct lp_build_image_soa * struct lp_build_image_soa *
draw_llvm_image_soa_create(const struct draw_image_static_state *static_state) draw_llvm_image_soa_create(const struct draw_image_static_state *static_state,
unsigned nr_images)
{ {
struct draw_llvm_image_soa *image; struct draw_llvm_image_soa *image;
...@@ -434,5 +489,6 @@ draw_llvm_image_soa_create(const struct draw_image_static_state *static_state) ...@@ -434,5 +489,6 @@ draw_llvm_image_soa_create(const struct draw_image_static_state *static_state)
image->dynamic_state.static_state = static_state; image->dynamic_state.static_state = static_state;
image->nr_images = nr_images;
return &image->base; return &image->base;
} }
...@@ -838,6 +838,16 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm, ...@@ -838,6 +838,16 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm,
tmp_type = type; tmp_type = type;
tmp_type.length = 4; tmp_type.length = 4;
if (type.length == 1) {
LLVMValueRef fetch = lp_build_fetch_rgba_aos(gallivm, format_desc, tmp_type,
aligned, base_ptr, offset,
i, j, cache);
for (k = 0; k < 4; k++)
rgba_out[k] = LLVMBuildExtractElement(gallivm->builder, fetch, lp_build_const_int32(gallivm, k), "");
return;
}
/* /*
* Note that vector transpose can be worse compared to insert/extract * Note that vector transpose can be worse compared to insert/extract
* for aos->soa conversion (for formats with 1 or 2 channels). However, * for aos->soa conversion (for formats with 1 or 2 channels). However,
......
...@@ -1077,6 +1077,10 @@ static void visit_load_image(struct lp_build_nir_context *bld_base, ...@@ -1077,6 +1077,10 @@ static void visit_load_image(struct lp_build_nir_context *bld_base,
LLVMValueRef coords[5]; LLVMValueRef coords[5];
struct lp_img_params params; struct lp_img_params params;
const struct glsl_type *type = glsl_without_array(var->type); const struct glsl_type *type = glsl_without_array(var->type);
unsigned const_index;
LLVMValueRef indir_index;
get_deref_offset(bld_base, deref, false, NULL, NULL,
&const_index, &indir_index);
memset(&params, 0, sizeof(params)); memset(&params, 0, sizeof(params));
params.target = glsl_sampler_to_pipe(glsl_get_sampler_dim(type), glsl_sampler_type_is_array(type)); params.target = glsl_sampler_to_pipe(glsl_get_sampler_dim(type), glsl_sampler_type_is_array(type));
...@@ -1090,7 +1094,8 @@ static void visit_load_image(struct lp_build_nir_context *bld_base, ...@@ -1090,7 +1094,8 @@ static void visit_load_image(struct lp_build_nir_context *bld_base,
params.img_op = LP_IMG_LOAD; params.img_op = LP_IMG_LOAD;
if (glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_MS) if (glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_MS)
params.ms_index = get_src(bld_base, instr->src[2]); params.ms_index = get_src(bld_base, instr->src[2]);
params.image_index = var->data.binding; params.image_index = var->data.binding + (indir_index ? 0 : const_index);
params.image_index_offset = indir_index;
bld_base->image_op(bld_base, &params); bld_base->image_op(bld_base, &params);
} }
...@@ -1106,6 +1111,10 @@ static void visit_store_image(struct lp_build_nir_context *bld_base, ...@@ -1106,6 +1111,10 @@ static void visit_store_image(struct lp_build_nir_context *bld_base,
LLVMValueRef coords[5]; LLVMValueRef coords[5];
struct lp_img_params params; struct lp_img_params params;
const struct glsl_type *type = glsl_without_array(var->type); const struct glsl_type *type = glsl_without_array(var->type);
unsigned const_index;
LLVMValueRef indir_index;
get_deref_offset(bld_base, deref, false, NULL, NULL,
&const_index, &indir_index);
memset(&params, 0, sizeof(params)); memset(&params, 0, sizeof(params));
params.target = glsl_sampler_to_pipe(glsl_get_sampler_dim(type), glsl_sampler_type_is_array(type)); params.target = glsl_sampler_to_pipe(glsl_get_sampler_dim(type), glsl_sampler_type_is_array(type));
...@@ -1122,7 +1131,8 @@ static void visit_store_image(struct lp_build_nir_context *bld_base, ...@@ -1122,7 +1131,8 @@ static void visit_store_image(struct lp_build_nir_context *bld_base,
if (glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_MS) if (glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_MS)
params.ms_index = get_src(bld_base, instr->src[2]); params.ms_index = get_src(bld_base, instr->src[2]);
params.img_op = LP_IMG_STORE; params.img_op = LP_IMG_STORE;
params.image_index = var->data.binding; params.image_index = var->data.binding + (indir_index ? 0 : const_index);
params.image_index_offset = indir_index;
if (params.target == PIPE_TEXTURE_1D_ARRAY) if (params.target == PIPE_TEXTURE_1D_ARRAY)
coords[2] = coords[1]; coords[2] = coords[1];
...@@ -1142,6 +1152,10 @@ static void visit_atomic_image(struct lp_build_nir_context *bld_base, ...@@ -1142,6 +1152,10 @@ static void visit_atomic_image(struct lp_build_nir_context *bld_base,
LLVMValueRef in_val = get_src(bld_base, instr->src[3]); LLVMValueRef in_val = get_src(bld_base, instr->src[3]);
LLVMValueRef coords[5]; LLVMValueRef coords[5];
const struct glsl_type *type = glsl_without_array(var->type); const struct glsl_type *type = glsl_without_array(var->type);
unsigned const_index;
LLVMValueRef indir_index;
get_deref_offset(bld_base, deref, false, NULL, NULL,
&const_index, &indir_index);
memset(&params, 0, sizeof(params)); memset(&params, 0, sizeof(params));
...@@ -1194,7 +1208,8 @@ static void visit_atomic_image(struct lp_build_nir_context *bld_base, ...@@ -1194,7 +1208,8 @@ static void visit_atomic_image(struct lp_build_nir_context *bld_base,
params.outdata = result; params.outdata = result;
params.img_op = (instr->intrinsic == nir_intrinsic_image_deref_atomic_comp_swap) ? LP_IMG_ATOMIC_CAS : LP_IMG_ATOMIC; params.img_op = (instr->intrinsic == nir_intrinsic_image_deref_atomic_comp_swap) ? LP_IMG_ATOMIC_CAS : LP_IMG_ATOMIC;
params.image_index = var->data.binding; params.image_index = var->data.binding + (indir_index ? 0 : const_index);
params.image_index_offset = indir_index;
bld_base->image_op(bld_base, &params); bld_base->image_op(bld_base, &params);
} }
...@@ -1207,8 +1222,14 @@ static void visit_image_size(struct lp_build_nir_context *bld_base, ...@@ -1207,8 +1222,14 @@ static void visit_image_size(struct lp_build_nir_context *bld_base,
nir_deref_instr *deref = nir_instr_as_deref(instr->src[0].ssa->parent_instr); nir_deref_instr *deref = nir_instr_as_deref(instr->src[0].ssa->parent_instr);
nir_variable *var = nir_deref_instr_get_variable(deref); nir_variable *var = nir_deref_instr_get_variable(deref);
struct lp_sampler_size_query_params params = { 0 }; struct lp_sampler_size_query_params params = { 0 };
params.texture_unit = var->data.binding; unsigned const_index;
params.target = glsl_sampler_to_pipe(glsl_get_sampler_dim(var->type), glsl_sampler_type_is_array(var->type)); LLVMValueRef indir_index;
const struct glsl_type *type = glsl_without_array(var->type);
get_deref_offset(bld_base, deref, false, NULL, NULL,
&const_index, &indir_index);
params.texture_unit = var->data.binding + (indir_index ? 0 : const_index);
params.texture_unit_offset = indir_index;
params.target = glsl_sampler_to_pipe(glsl_get_sampler_dim(type), glsl_sampler_type_is_array(type));
params.sizes_out = result; params.sizes_out = result;
bld_base->image_size(bld_base, &params); bld_base->image_size(bld_base, &params);
...@@ -1221,8 +1242,15 @@ static void visit_image_samples(struct lp_build_nir_context *bld_base, ...@@ -1221,8 +1242,15 @@ static void visit_image_samples(struct lp_build_nir_context *bld_base,
nir_deref_instr *deref = nir_instr_as_deref(instr->src[0].ssa->parent_instr); nir_deref_instr *deref = nir_instr_as_deref(instr->src[0].ssa->parent_instr);
nir_variable *var = nir_deref_instr_get_variable(deref); nir_variable *var = nir_deref_instr_get_variable(deref);
struct lp_sampler_size_query_params params = { 0 }; struct lp_sampler_size_query_params params = { 0 };
params.texture_unit = var->data.binding; unsigned const_index;
params.target = glsl_sampler_to_pipe(glsl_get_sampler_dim(var->type), glsl_sampler_type_is_array(var->type)); LLVMValueRef indir_index;
const struct glsl_type *type = glsl_without_array(var->type);
get_deref_offset(bld_base, deref, false, NULL, NULL,
&const_index, &indir_index);
params.texture_unit = var->data.binding + (indir_index ? 0 : const_index);
params.texture_unit_offset = indir_index;
params.target = glsl_sampler_to_pipe(glsl_get_sampler_dim(type), glsl_sampler_type_is_array(type));
params.sizes_out = result; params.sizes_out = result;
params.samples_only = true; params.samples_only = true;
...@@ -1496,6 +1524,7 @@ static void visit_intrinsic(struct lp_build_nir_context *bld_base, ...@@ -1496,6 +1524,7 @@ static void visit_intrinsic(struct lp_build_nir_context *bld_base,
case nir_intrinsic_global_atomic_exchange: case nir_intrinsic_global_atomic_exchange:
case nir_intrinsic_global_atomic_comp_swap: case nir_intrinsic_global_atomic_comp_swap:
visit_global_atomic(bld_base, instr, result); visit_global_atomic(bld_base, instr, result);
break;
case nir_intrinsic_vote_all: case nir_intrinsic_vote_all:
case nir_intrinsic_vote_any: case nir_intrinsic_vote_any:
case nir_intrinsic_vote_ieq: case nir_intrinsic_vote_ieq:
...@@ -1520,12 +1549,15 @@ static void visit_txs(struct lp_build_nir_context *bld_base, nir_tex_instr *inst ...@@ -1520,12 +1549,15 @@ static void visit_txs(struct lp_build_nir_context *bld_base, nir_tex_instr *inst
struct lp_sampler_size_query_params params = { 0 }; struct lp_sampler_size_query_params params = { 0 };
LLVMValueRef sizes_out[NIR_MAX_VEC_COMPONENTS]; LLVMValueRef sizes_out[NIR_MAX_VEC_COMPONENTS];
LLVMValueRef explicit_lod = NULL; LLVMValueRef explicit_lod = NULL;
LLVMValueRef texture_unit_offset = NULL;
for (unsigned i = 0; i < instr->num_srcs; i++) { for (unsigned i = 0; i < instr->num_srcs; i++) {
switch (instr->src[i].src_type) { switch (instr->src[i].src_type) {
case nir_tex_src_lod: case nir_tex_src_lod:
explicit_lod = cast_type(bld_base, get_src(bld_base, instr->src[i].src), nir_type_int, 32); explicit_lod = cast_type(bld_base, get_src(bld_base, instr->src[i].src), nir_type_int, 32);
break; break;
case nir_tex_src_texture_offset:
texture_unit_offset = get_src(bld_base, instr->src[i].src);
break;
default: default:
break; break;
} }
...@@ -1537,6 +1569,7 @@ static void visit_txs(struct lp_build_nir_context *bld_base, nir_tex_instr *inst ...@@ -1537,6 +1569,7 @@ static void visit_txs(struct lp_build_nir_context *bld_base, nir_tex_instr *inst
params.is_sviewinfo = TRUE; params.is_sviewinfo = TRUE;
params.sizes_out = sizes_out; params.sizes_out = sizes_out;
params.samples_only = (instr->op == nir_texop_texture_samples); params.samples_only = (instr->op == nir_texop_texture_samples);
params.texture_unit_offset = texture_unit_offset;
if (instr->op == nir_texop_query_levels) if (instr->op == nir_texop_query_levels)
params.explicit_lod = bld_base->uint_bld.zero; params.explicit_lod = bld_base->uint_bld.zero;
...@@ -1574,6 +1607,7 @@ static void visit_tex(struct lp_build_nir_context *bld_base, nir_tex_instr *inst ...@@ -1574,6 +1607,7 @@ static void visit_tex(struct lp_build_nir_context *bld_base, nir_tex_instr *inst
unsigned sample_key = 0; unsigned sample_key = 0;
nir_deref_instr *texture_deref_instr = NULL; nir_deref_instr *texture_deref_instr = NULL;
nir_deref_instr *sampler_deref_instr = NULL; nir_deref_instr *sampler_deref_instr = NULL;
LLVMValueRef texture_unit_offset = NULL;
LLVMValueRef texel[NIR_MAX_VEC_COMPONENTS]; LLVMValueRef texel[NIR_MAX_VEC_COMPONENTS];
unsigned lod_src = 0; unsigned lod_src = 0;
LLVMValueRef coord_undef = LLVMGetUndef(bld_base->base.int_vec_type); LLVMValueRef coord_undef = LLVMGetUndef(bld_base->base.int_vec_type);
...@@ -1686,6 +1720,12 @@ static void visit_tex(struct lp_build_nir_context *bld_base, nir_tex_instr *inst ...@@ -1686,6 +1720,12 @@ static void visit_tex(struct lp_build_nir_context *bld_base, nir_tex_instr *inst
sample_key |= LP_SAMPLER_FETCH_MS; sample_key |= LP_SAMPLER_FETCH_MS;
ms_index = cast_type(bld_base, get_src(bld_base, instr->src[i].src), nir_type_int, 32); ms_index = cast_type(bld_base, get_src(bld_base, instr->src[i].src), nir_type_int, 32);
break; break;
case nir_tex_src_texture_offset:
texture_unit_offset = get_src(bld_base, instr->src[i].src);
break;
case nir_tex_src_sampler_offset:
break;
default: default:
assert(0); assert(0);
break; break;
...@@ -1742,6 +1782,7 @@ static void visit_tex(struct lp_build_nir_context *bld_base, nir_tex_instr *inst ...@@ -1742,6 +1782,7 @@ static void visit_tex(struct lp_build_nir_context *bld_base, nir_tex_instr *inst
params.sample_key = sample_key; params.sample_key = sample_key;
params.offsets = offsets; params.offsets = offsets;
params.texture_index = base_index; params.texture_index = base_index;
params.texture_index_offset = texture_unit_offset;
params.sampler_index = base_index; params.sampler_index = base_index;
params.coords = coords; params.coords = coords;
params.texel = texel; params.texel = texel;
......
...@@ -1225,10 +1225,17 @@ static void emit_image_op(struct lp_build_nir_context *bld_base, ...@@ -1225,10 +1225,17 @@ static void emit_image_op(struct lp_build_nir_context *bld_base,
struct lp_img_params *params) struct lp_img_params *params)
{ {
struct lp_build_nir_soa_context *bld = (struct lp_build_nir_soa_context *)bld_base; struct lp_build_nir_soa_context *bld = (struct lp_build_nir_soa_context *)bld_base;
struct gallivm_state *gallivm = bld_base->base.gallivm;
params->type = bld_base->base.type; params->type = bld_base->base.type;
params->context_ptr = bld->context_ptr; params->context_ptr = bld->context_ptr;
params->thread_data_ptr = bld->thread_data_ptr; params->thread_data_ptr = bld->thread_data_ptr;
params->exec_mask = mask_vec(bld_base); params->exec_mask = mask_vec(bld_base);
if (params->image_index_offset)
params->image_index_offset = LLVMBuildExtractElement(gallivm->builder, params->image_index_offset,
lp_build_const_int32(gallivm, 0), "");
bld->image->emit_op(bld->image, bld->image->emit_op(bld->image,
bld->bld_base.base.gallivm, bld->bld_base.base.gallivm,
params); params);
...@@ -1239,10 +1246,14 @@ static void emit_image_size(struct lp_build_nir_context *bld_base, ...@@ -1239,10 +1246,14 @@ static void emit_image_size(struct lp_build_nir_context *bld_base,
struct lp_sampler_size_query_params *params) struct lp_sampler_size_query_params *params)
{ {
struct lp_build_nir_soa_context *bld = (struct lp_build_nir_soa_context *)bld_base; struct lp_build_nir_soa_context *bld = (struct lp_build_nir_soa_context *)bld_base;
struct gallivm_state *gallivm = bld_base->base.gallivm;
params->int_type = bld_base->int_bld.type; params->int_type = bld_base->int_bld.type;
params->context_ptr = bld->context_ptr; params->context_ptr = bld->context_ptr;
if (params->texture_unit_offset)
params->texture_unit_offset = LLVMBuildExtractElement(gallivm->builder, params->texture_unit_offset,
lp_build_const_int32(gallivm, 0), "");
bld->image->emit_size_query(bld->image, bld->image->emit_size_query(bld->image,
bld->bld_base.base.gallivm, bld->bld_base.base.gallivm,
params); params);
...@@ -1291,11 +1302,64 @@ static void emit_tex(struct lp_build_nir_context *bld_base, ...@@ -1291,11 +1302,64 @@ static void emit_tex(struct lp_build_nir_context *bld_base,
struct lp_sampler_params *params) struct lp_sampler_params *params)
{ {
struct lp_build_nir_soa_context *bld = (struct lp_build_nir_soa_context *)bld_base; struct lp_build_nir_soa_context *bld = (struct lp_build_nir_soa_context *)bld_base;
struct gallivm_state *gallivm = bld_base->base.gallivm;
params->type = bld_base->base.type; params->type = bld_base->base.type;
params->context_ptr = bld->context_ptr; params->context_ptr = bld->context_ptr;
params->thread_data_ptr = bld->thread_data_ptr; params->thread_data_ptr = bld->thread_data_ptr;
if (params->texture_index_offset && bld_base->shader->info.stage != MESA_SHADER_FRAGMENT) {
/* this is horrible but this can be dynamic */
LLVMValueRef coords[5];
LLVMValueRef *orig_texel_ptr;
struct lp_build_context *uint_bld = &bld_base->uint_bld;
LLVMValueRef result[4] = { LLVMGetUndef(bld_base->base.vec_type),
LLVMGetUndef(bld_base->base.vec_type),
LLVMGetUndef(bld_base->base.vec_type),
LLVMGetUndef(bld_base->base.vec_type) };
LLVMValueRef texel[4], orig_offset;
unsigned i;
orig_texel_ptr = params->texel;
for (i = 0; i < 5; i++) {
coords[i] = params->coords[i];
}
orig_offset = params->texture_index_offset;
for (unsigned v = 0; v < uint_bld->type.length; v++) {
LLVMValueRef idx = lp_build_const_int32(gallivm, v);
LLVMValueRef new_coords[5];
for (i = 0; i < 5; i++) {
new_coords[i] = LLVMBuildExtractElement(gallivm->builder,
coords[i], idx, "");
}
params->coords = new_coords;
params->texture_index_offset = LLVMBuildExtractElement(gallivm->builder,
orig_offset,
idx, "");
params->type = lp_elem_type(bld_base->base.type);
params->texel = texel;
bld->sampler->emit_tex_sample(bld->sampler,
gallivm,
params);
for (i = 0; i < 4; i++) {
result[i] = LLVMBuildInsertElement(gallivm->builder, result[i], texel[i], idx, "");
}
}
for (i = 0; i < 4; i++) {
orig_texel_ptr[i] = result[i];
}
return;
}
if (params->texture_index_offset)
params->texture_index_offset = LLVMBuildExtractElement(bld_base->base.gallivm->builder,
params->texture_index_offset,
lp_build_const_int32(bld_base->base.gallivm, 0), "");
params->type = bld_base->base.type;
bld->sampler->emit_tex_sample(bld->sampler, bld->sampler->emit_tex_sample(bld->sampler,
bld->bld_base.base.gallivm, bld->bld_base.base.gallivm,
params); params);
...@@ -1309,6 +1373,10 @@ static void emit_tex_size(struct lp_build_nir_context *bld_base, ...@@ -1309,6 +1373,10 @@ static void emit_tex_size(struct lp_build_nir_context *bld_base,
params->int_type = bld_base->int_bld.type; params->int_type = bld_base->int_bld.type;
params->context_ptr = bld->context_ptr; params->context_ptr = bld->context_ptr;
if (params->texture_unit_offset)
params->texture_unit_offset = LLVMBuildExtractElement(bld_base->base.gallivm->builder,
params->texture_unit_offset,
lp_build_const_int32(bld_base->base.gallivm, 0), "");
bld->sampler->emit_size_query(bld->sampler, bld->sampler->emit_size_query(bld->sampler,
bld->bld_base.base.gallivm, bld->bld_base.base.gallivm,
params); params);
......
...@@ -282,7 +282,7 @@ lp_build_rho(struct lp_build_sample_context *bld, ...@@ -282,7 +282,7 @@ lp_build_rho(struct lp_build_sample_context *bld,
*/ */
first_level = bld->dynamic_state->first_level(bld->dynamic_state, bld->gallivm, first_level = bld->dynamic_state->first_level(bld->dynamic_state, bld->gallivm,
bld->context_ptr, texture_unit); bld->context_ptr, texture_unit, NULL);
first_level_vec = lp_build_broadcast_scalar(int_size_bld, first_level); first_level_vec = lp_build_broadcast_scalar(int_size_bld, first_level);
int_size = lp_build_minify(int_size_bld, bld->int_size, first_level_vec, TRUE); int_size = lp_build_minify