mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
i915: pass NIR to draw instead of pre-converted TGSI
draw_vs.c already handles the non-native-integer NIR→TGSI conversion internally, so i915 doesn't need to do it. keep nir_lower_point_size (i915-specific lowering) and pass the result to draw as NIR. Assisted-by: Claude
This commit is contained in:
parent
470897f946
commit
2f5686e212
1 changed files with 3 additions and 20 deletions
|
|
@ -667,28 +667,11 @@ i915_create_vs_state(struct pipe_context *pipe,
|
|||
const struct pipe_shader_state *templ)
|
||||
{
|
||||
struct i915_context *i915 = i915_context(pipe);
|
||||
void *vertex_shader;
|
||||
|
||||
struct pipe_shader_state from_nir = {PIPE_SHADER_IR_TGSI};
|
||||
if (templ->type == PIPE_SHADER_IR_NIR) {
|
||||
nir_shader *s = templ->ir.nir;
|
||||
if (templ->type == PIPE_SHADER_IR_NIR)
|
||||
NIR_PASS(_, templ->ir.nir, nir_lower_point_size, 1.0, 255.0);
|
||||
|
||||
NIR_PASS(_, s, nir_lower_point_size, 1.0, 255.0);
|
||||
|
||||
/* The gallivm draw path doesn't support non-native-integers NIR shaders,
|
||||
* st/mesa does native-integers for the screen as a whole rather than
|
||||
* per-stage, and i915 FS can't do native integers. So, convert to TGSI,
|
||||
* where the draw path *does* support non-native-integers.
|
||||
*/
|
||||
from_nir.tokens = nir_to_tgsi(s, pipe->screen);
|
||||
templ = &from_nir;
|
||||
}
|
||||
|
||||
vertex_shader = draw_create_vertex_shader(i915->draw, templ);
|
||||
|
||||
FREE((void *)from_nir.tokens);
|
||||
|
||||
return vertex_shader;
|
||||
return draw_create_vertex_shader(i915->draw, templ);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue