From: Dave Airlie Date: Thu, 9 Jan 2020 18:18:19 +0000 (+1000) Subject: llvmpipe: add ARB_derivative_control support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85eed5def3056d522971820e2ec3a0a0fd622ff5;p=mesa.git llvmpipe: add ARB_derivative_control support Reviewed-by: Roland Scheidegger --- diff --git a/.gitlab-ci/piglit/glslparser.txt b/.gitlab-ci/piglit/glslparser.txt index d01136abbdc..2f8f4e0b187 100644 --- a/.gitlab-ci/piglit/glslparser.txt +++ b/.gitlab-ci/piglit/glslparser.txt @@ -350,16 +350,20 @@ spec/arb_conservative_depth/preprocessor/disabled-undefined-core.tese: skip spec/arb_conservative_depth/preprocessor/disabled-undefined-core.vert: skip spec/arb_conservative_depth/preprocessor/enabled-core.tesc: skip spec/arb_conservative_depth/preprocessor/enabled-core.tese: skip +spec/arb_derivative_control/preprocessor/disabled-defined-core.comp: skip +spec/arb_derivative_control/preprocessor/disabled-defined-core.frag: skip +spec/arb_derivative_control/preprocessor/disabled-defined-core.geom: skip spec/arb_derivative_control/preprocessor/disabled-defined-core.tesc: skip spec/arb_derivative_control/preprocessor/disabled-defined-core.tese: skip +spec/arb_derivative_control/preprocessor/disabled-defined-core.vert: skip +spec/arb_derivative_control/preprocessor/disabled-undefined-core.comp: skip +spec/arb_derivative_control/preprocessor/disabled-undefined-core.frag: skip +spec/arb_derivative_control/preprocessor/disabled-undefined-core.geom: skip spec/arb_derivative_control/preprocessor/disabled-undefined-core.tesc: skip spec/arb_derivative_control/preprocessor/disabled-undefined-core.tese: skip -spec/arb_derivative_control/preprocessor/enabled-core.comp: skip -spec/arb_derivative_control/preprocessor/enabled-core.frag: skip -spec/arb_derivative_control/preprocessor/enabled-core.geom: skip +spec/arb_derivative_control/preprocessor/disabled-undefined-core.vert: skip spec/arb_derivative_control/preprocessor/enabled-core.tesc: skip spec/arb_derivative_control/preprocessor/enabled-core.tese: skip -spec/arb_derivative_control/preprocessor/enabled-core.vert: skip spec/arb_draw_buffers/preprocessor/disabled-defined-compat.frag: skip spec/arb_draw_buffers/preprocessor/disabled-defined-compat.vert: skip spec/arb_draw_buffers/preprocessor/disabled-defined-core.comp: skip @@ -5098,10 +5102,10 @@ spec/oes_texture_storage_multisample_2d_array/preprocessor/enabled-es.tese: skip summary: name: results ---- -------- - pass: 9686 + pass: 9682 fail: 2 crash: 0 - skip: 5095 + skip: 5099 timeout: 0 warn: 0 incomplete: 0 diff --git a/.gitlab-ci/piglit/quick_shader.txt b/.gitlab-ci/piglit/quick_shader.txt index c6aa27b071a..77e730e34ad 100644 --- a/.gitlab-ci/piglit/quick_shader.txt +++ b/.gitlab-ci/piglit/quick_shader.txt @@ -124,11 +124,6 @@ spec/arb_compute_variable_group_size/execution/separate-global-id-2: skip spec/arb_compute_variable_group_size/linker/mixed_fixed_variable_local_work_size: skip spec/arb_compute_variable_group_size/linker/no_local_size_specified: skip spec/arb_cull_distance/clip-cull-4: fail -spec/arb_derivative_control/execution/dfdx-coarse: skip -spec/arb_derivative_control/execution/dfdx-dfdy: skip -spec/arb_derivative_control/execution/dfdx-fine: skip -spec/arb_derivative_control/execution/dfdy-coarse: skip -spec/arb_derivative_control/execution/dfdy-fine: skip spec/arb_enhanced_layouts/execution/component-layout/vs-tcs-load-output: skip spec/arb_enhanced_layouts/execution/component-layout/vs-tcs-load-output-indirect: skip spec/arb_enhanced_layouts/execution/component-layout/vs-tcs-tes-fs: skip @@ -6408,10 +6403,10 @@ spec/oes_viewport_array/viewport-gs-writes-out-of-range: skip summary: name: results ---- -------- - pass: 8939 + pass: 8944 fail: 55 crash: 0 - skip: 6352 + skip: 6347 timeout: 0 warn: 0 incomplete: 0 diff --git a/docs/features.txt b/docs/features.txt index c1d24f3a7fe..fc85970d06c 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -215,7 +215,7 @@ GL 4.5, GLSL 4.50 -- all DONE: nvc0, radeonsi, r600 GL_ARB_clip_control DONE (freedreno, i965, nv50, llvmpipe, softpipe, swr) GL_ARB_conditional_render_inverted DONE (freedreno, i965, nv50, llvmpipe, softpipe, swr, virgl) GL_ARB_cull_distance DONE (i965, nv50, llvmpipe, softpipe, swr, virgl) - GL_ARB_derivative_control DONE (i965, nv50, softpipe, virgl) + GL_ARB_derivative_control DONE (i965, nv50, llvmpipe, softpipe, virgl) GL_ARB_direct_state_access DONE (all drivers) GL_ARB_get_texture_sub_image DONE (all drivers) GL_ARB_shader_texture_image_samples DONE (i965, nv50, virgl) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index 290f64e3f2c..3eb7a128a3f 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -474,9 +474,13 @@ static LLVMValueRef do_alu_action(struct lp_build_nir_context *bld_base, result = lp_build_cos(&bld_base->base, src[0]); break; case nir_op_fddx: + case nir_op_fddx_coarse: + case nir_op_fddx_fine: result = lp_build_ddx(&bld_base->base, src[0]); break; case nir_op_fddy: + case nir_op_fddy_coarse: + case nir_op_fddy_fine: result = lp_build_ddy(&bld_base->base, src[0]); break; case nir_op_fdiv: diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 8d167b99d32..82085a08e11 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -266,7 +266,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: return 1; case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: - return 0; + return 1; case PIPE_CAP_TGSI_TEX_TXF_LZ: case PIPE_CAP_SAMPLER_VIEW_TARGET: return 1;