瀏覽代碼

use FetchTexelf() in GetTexImage() to return float textures correctly

tags/R300_DRIVER_0
Brian Paul 21 年之前
父節點
當前提交
5b45c11486
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. 6
    5
      src/mesa/main/teximage.c

+ 6
- 5
src/mesa/main/teximage.c 查看文件

@@ -1982,14 +1982,15 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
}
else {
/* general case: convert row to RGBA format */
GLchan rgba[MAX_WIDTH][4];
GLfloat rgba[MAX_WIDTH][4];
GLint col;
for (col = 0; col < width; col++) {
(*texImage->FetchTexelc)(texImage, col, row, img, rgba[col]);
(*texImage->FetchTexelf)(texImage, col, row, img, rgba[col]);
}
_mesa_pack_rgba_span_chan(ctx, width, (const GLchan (*)[4])rgba,
format, type, dest, &ctx->Pack,
0 /* no image transfer */);
_mesa_pack_rgba_span_float(ctx, width,
(const GLfloat (*)[4]) rgba,
format, type, dest, &ctx->Pack,
0 /* no image transfer */);
} /* format */
} /* row */
} /* img */

Loading…
取消
儲存