From b090033087d9e00740cec3abb7ff5febf13f20a7 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 4 Feb 2017 22:31:29 -0500 Subject: gallium: add separate PIPE_CAP_INT64_DIVMOD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nouveau does not currently have logic to implement this as a library function. Even though such a library could be written, there's no big advantage to do it that way for now given that int64 is a very uncommon use-case. Allow a driver to expose INT64 without supporting division and modulo operations. Signed-off-by: Ilia Mirkin Reviewed-by: Nicolai Hähnle --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index fc981ab0b22..630f5af821c 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -7042,6 +7042,9 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) options->EmitNoIndirectUniform); } + if (!pscreen->get_param(pscreen, PIPE_CAP_INT64_DIVMOD)) + lower_64bit_integer_instructions(ir, DIV64 | MOD64); + if (ctx->Extensions.ARB_shading_language_packing) { unsigned lower_inst = LOWER_PACK_SNORM_2x16 | LOWER_UNPACK_SNORM_2x16 | -- cgit v1.2.3