mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 05:50:25 +01:00
Merge git://proxy01.pd.intel.com:9419/git/mesa/mesa into crestline
This commit is contained in:
commit
fd1b1fce3f
2 changed files with 20 additions and 2 deletions
|
|
@ -3608,6 +3608,25 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
|
|||
GLint col;
|
||||
for (col = 0; col < width; col++) {
|
||||
(*texImage->FetchTexelf)(texImage, col, row, img, rgba[col]);
|
||||
if (texImage->TexFormat->BaseFormat == GL_ALPHA) {
|
||||
rgba[col][RCOMP] = 0.0;
|
||||
rgba[col][GCOMP] = 0.0;
|
||||
rgba[col][BCOMP] = 0.0;
|
||||
}
|
||||
else if (texImage->TexFormat->BaseFormat == GL_LUMINANCE) {
|
||||
rgba[col][GCOMP] = 0.0;
|
||||
rgba[col][BCOMP] = 0.0;
|
||||
rgba[col][ACOMP] = 1.0;
|
||||
}
|
||||
else if (texImage->TexFormat->BaseFormat == GL_LUMINANCE_ALPHA) {
|
||||
rgba[col][GCOMP] = 0.0;
|
||||
rgba[col][BCOMP] = 0.0;
|
||||
}
|
||||
else if (texImage->TexFormat->BaseFormat == GL_INTENSITY) {
|
||||
rgba[col][GCOMP] = 0.0;
|
||||
rgba[col][BCOMP] = 0.0;
|
||||
rgba[col][ACOMP] = 1.0;
|
||||
}
|
||||
}
|
||||
_mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba,
|
||||
format, type, dest,
|
||||
|
|
|
|||
|
|
@ -100,8 +100,7 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog)
|
|||
}
|
||||
|
||||
/* Append original instructions after new instructions */
|
||||
_mesa_memcpy(newInst + 4, vprog->Base.Instructions,
|
||||
origLen * sizeof(struct prog_instruction));
|
||||
_mesa_copy_instructions (newInst + 4, vprog->Base.Instructions, origLen);
|
||||
|
||||
/* free old instructions */
|
||||
_mesa_free(vprog->Base.Instructions);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue