diff --git a/src/gallium/auxiliary/draw/draw_vs.c b/src/gallium/auxiliary/draw/draw_vs.c index e8dbc11bca6..20ecc2f1696 100644 --- a/src/gallium/auxiliary/draw/draw_vs.c +++ b/src/gallium/auxiliary/draw/draw_vs.c @@ -35,6 +35,8 @@ #include "util/u_memory.h" #include "pipe/p_shader_tokens.h" +#include "pipe/p_context.h" +#include "pipe/p_screen.h" #include "draw_private.h" #include "draw_context.h" @@ -46,6 +48,8 @@ #include "tgsi/tgsi_dump.h" #include "tgsi/tgsi_exec.h" +#include "nir/nir_to_tgsi.h" + DEBUG_GET_ONCE_BOOL_OPTION(gallium_dump_vs, "GALLIUM_DUMP_VS", FALSE) @@ -54,6 +58,7 @@ draw_create_vertex_shader(struct draw_context *draw, const struct pipe_shader_state *shader) { struct draw_vertex_shader *vs = NULL; + struct pipe_shader_state state = *shader; if (draw->dump_vs) { tgsi_dump(shader->tokens, 0); @@ -61,12 +66,19 @@ draw_create_vertex_shader(struct draw_context *draw, #ifdef DRAW_LLVM_AVAILABLE if (draw->pt.middle.llvm) { - vs = draw_create_vs_llvm(draw, shader); + struct pipe_screen *screen = draw->pipe->screen; + if (shader->type == PIPE_SHADER_IR_NIR && + (!screen->get_shader_param(screen, PIPE_SHADER_VERTEX, + PIPE_SHADER_CAP_INTEGERS))) { + state.type = PIPE_SHADER_IR_TGSI; + state.tokens = nir_to_tgsi(shader->ir.nir, screen); + } + vs = draw_create_vs_llvm(draw, &state); } #endif if (!vs) { - vs = draw_create_vs_exec( draw, shader ); + vs = draw_create_vs_exec( draw, &state ); } if (vs) diff --git a/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt b/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt index 50d0e79b086..c33825b7fac 100644 --- a/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt +++ b/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt @@ -20,16 +20,9 @@ spec@!opengl 1.0@gl-1.0-drawbuffer-modes,Fail spec@!opengl 1.0@gl-1.0-long-line-loop,Crash spec@!opengl 1.0@gl-1.0-no-op-paths,Fail spec@!opengl 1.0@gl-1.0-ortho-pos,Crash -spec@!opengl 1.0@gl-1.0-rendermode-feedback,Crash spec@!opengl 1.0@gl-1.0-scissor-offscreen,Fail spec@!opengl 1.0@gl-1.0-swapbuffers-behavior,Fail -# mesa/st draw path doesn't do nir-to-tgsi, so gallivm NIR fails -# to handle our vector-y, non-native-integers shaders. We could extend -# gallivm NIR to handle it, or disentangle per-stage native integers on the -# frontend. -spec@!opengl 1.0@rasterpos,Crash - spec@!opengl 1.1@clipflat,Fail spec@!opengl 1.1@clipflat@glBegin/End(GL_TRIANGLE_FAN)- glFrontFace(GL_CCW)- glPolygonMode(GL_FILL)- quadrant: center middle PV: FIRST,Fail spec@!opengl 1.1@clipflat@glBegin/End(GL_TRIANGLE_FAN)- glFrontFace(GL_CW)- glPolygonMode(GL_FILL)- quadrant: center middle PV: FIRST,Fail @@ -54,11 +47,6 @@ spec@!opengl 1.1@getteximage-formats,Crash spec@!opengl 1.1@gl-1.1-drawarrays-vertex-count 100000 varray gl_quad_strip,Crash spec@!opengl 1.1@gl-1.1-drawarrays-vertex-count 100000 vbo gl_quad_strip,Crash spec@!opengl 1.1@gl-1.2-texture-base-level,Fail -spec@!opengl 1.1@gl_select - alpha-test enabled,Crash -spec@!opengl 1.1@gl_select - depth-test enabled,Crash -spec@!opengl 1.1@gl_select - no test function,Crash -spec@!opengl 1.1@gl_select - scissor-test enabled,Crash -spec@!opengl 1.1@gl_select - stencil-test enabled,Crash spec@!opengl 1.1@line-flat-clip-color,Fail spec@!opengl 1.1@linestipple,Fail spec@!opengl 1.1@linestipple@Factor 2x,Fail