diff options
author | Erik Faye-Lund <[email protected]> | 2020-01-30 16:50:59 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-31 08:56:55 +0000 |
commit | 8405e1bef0cfa99a2e5e865cf5f933fddbd35222 (patch) | |
tree | 823a95d095c7cf218acc11ab8999ca2441d99b6a /src/gallium | |
parent | f12b844e7c284f691323d4f77f2fd94c648e37e0 (diff) |
zink: implement support for derivative-control
Reviewed-by: Dave Airlie <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3645>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3645>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/zink/zink_screen.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index 34bb14379c4..af1ddef11bd 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -911,7 +911,11 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu) UNOP(nir_op_ineg, SpvOpSNegate) UNOP(nir_op_fneg, SpvOpFNegate) UNOP(nir_op_fddx, SpvOpDPdx) + UNOP(nir_op_fddx_coarse, SpvOpDPdxCoarse) + UNOP(nir_op_fddx_fine, SpvOpDPdxFine) UNOP(nir_op_fddy, SpvOpDPdy) + UNOP(nir_op_fddy_coarse, SpvOpDPdyCoarse) + UNOP(nir_op_fddy_fine, SpvOpDPdyFine) UNOP(nir_op_f2i32, SpvOpConvertFToS) UNOP(nir_op_f2u32, SpvOpConvertFToU) UNOP(nir_op_i2f32, SpvOpConvertSToF) @@ -1846,6 +1850,7 @@ nir_to_spirv(struct nir_shader *s) if (s->info.stage == MESA_SHADER_FRAGMENT) { spirv_builder_emit_cap(&ctx.builder, SpvCapabilitySampled1D); spirv_builder_emit_cap(&ctx.builder, SpvCapabilityImageQuery); + spirv_builder_emit_cap(&ctx.builder, SpvCapabilityDerivativeControl); } ctx.stage = s->info.stage; diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 9e29a51862a..95031947116 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -211,6 +211,9 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET: return screen->props.limits.maxTexelGatherOffset; + case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + return 1; + case PIPE_CAP_VENDOR_ID: return screen->props.vendorID; case PIPE_CAP_DEVICE_ID: |