Commit 62e7cd2aca3f07438a8b25658918b3c87e6ebda6
mesa: Save META_SHADER in _mesa_meta_draw_tex.
| |   |
| 2061 | 2061 | |
| 2062 | 2062 | /** |
| 2063 | 2063 | * Meta implementation of ctx->Driver.DrawTex() in terms |
| * of texture mapping and polygon rendering. |
| * of polygon rendering. |
| 2065 | 2065 | */ |
| 2066 | 2066 | void |
| 2067 | 2067 | _mesa_meta_draw_tex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, |
| … | … | |
| 2072 | 2072 | GLfloat x, y, z, st[MAX_TEXTURE_UNITS][2]; |
| 2073 | 2073 | }; |
| 2074 | 2074 | struct vertex verts[4]; |
| GLboolean vp_enabled; |
| 2076 | 2075 | GLuint i; |
| 2077 | 2076 | |
| 2078 | 2077 | _mesa_meta_begin(ctx, (META_RASTERIZATION | |
| META_SHADER | |
| 2079 | 2079 | META_TRANSFORM | |
| 2080 | 2080 | META_VERTEX | |
| 2081 | 2081 | META_VIEWPORT)); |
| vp_enabled = ctx->VertexProgram.Enabled; |
| if (vp_enabled) |
| _mesa_set_enable(ctx, GL_VERTEX_PROGRAM_ARB, GL_FALSE); |
| 2085 | 2082 | |
| 2086 | 2083 | if (drawtex->ArrayObj == 0) { |
| 2087 | 2084 | /* one-time setup */ |
| … | … | |
| 2171 | 2171 | |
| 2172 | 2172 | _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); |
| 2173 | 2173 | |
| if (vp_enabled) |
| _mesa_set_enable(ctx, GL_VERTEX_PROGRAM_ARB, GL_TRUE); |
| 2176 | 2174 | _mesa_meta_end(ctx); |
| 2177 | 2175 | } |
| 2178 | 2176 | |