我正在尝试在 Ubuntu maverick 下编译 X11R6-7.0,但遇到了一些我无法解决的奇怪编译错误。
我需要 X11R6-7.0,因为 ati 催化剂驱动程序不支持更新的 xorg 和 oss 驱动程序不支持我的硬件的 3d 加速。
有谁知道这个错误信息是什么意思?我知道一些C,但我有点困惑。这是否意味着GET_FB_DATA
宏返回NULL
或某些方法/属性未设置?
任何进一步了解如何在这一点上“调试”预处理器定义都会很棒。我不认为我可以打印任何有用的东西#error
。
我得到的错误:
tdfx_span.c:在函数“tdfxDDWriteDepthPixels”中:
tdfx_span.c:976:错误:需要左值作为赋值的左操作数
tdfx_span.c:1008:错误:需要左值作为赋值的左操作数
tdfx_span.c:在函数“write_stencil_pixels”中:
tdfx_span.c:1242:错误:需要左值作为赋值的左操作数
编码:
958- switch (depth_size) {
959- case 16:
960- GetBackBufferInfo(fxMesa, &backBufferInfo);
961- /*
962- * Note that the _LOCK macro adds a curly brace,
963- * and the UNLOCK macro removes it.
964- */
965- WRITE_FB_SPAN_LOCK(fxMesa, info,
966- GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY);
967- {
968- LFBParameters ReadParams;
969- GetFbParams(fxMesa, &info, &backBufferInfo,
970- &ReadParams, sizeof(GLushort));
971- for (i = 0; i < n; i++) {
972- if (mask[i] && visible_pixel(fxMesa, x[i], y[i])) {
973- xpos = x[i] + fxMesa->x_offset;
974- ypos = bottom - y[i];
975- d16 = depth[i];
976: PUT_FB_DATA(&ReadParams, GLushort, xpos, ypos, d16);
977- }
978- }
979- }
980- WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER);
981- break;
982- case 24:
和相关宏:
#define GET_FB_DATA(ReadParamsp, type, x, y) \
(((x) < (ReadParamsp)->firstWrappedX) \
? (((type *)((ReadParamsp)->lfbPtr)) \
[(y) * ((ReadParamsp)->LFBStrideInElts) \
+ (x)]) \
: (((type *)((ReadParamsp)->lfbWrapPtr)) \
[((y)) * ((ReadParamsp)->LFBStrideInElts) \
+ ((x) - (ReadParamsp)->firstWrappedX)]))
#define GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) \
(((type *)((ReadParamsp)->lfbPtr)) \
[(y) * ((ReadParamsp)->LFBStrideInElts) \
+ (x)])
#define GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y) \
(((type *)((ReadParamsp)->lfbWrapPtr)) \
[((y)) * ((ReadParamsp)->LFBStrideInElts) \
+ ((x) - (ReadParamsp)->firstWrappedX)])
#define PUT_FB_DATA(ReadParamsp, type, x, y, value) \
(GET_FB_DATA(ReadParamsp, type, x, y) = (type)(value))
#define PUT_ORDINARY_FB_DATA(ReadParamsp, type, x, y, value) \
(GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) = (type)(value))
#define PUT_WRAPPED_FB_DATA(ReadParamsp, type, x, y, value) \
(GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y) = (type)(value))
LFBParameters 结构体
483-typedef struct
484-{
485- void *lfbPtr;
486- void *lfbWrapPtr;
487- FxU32 LFBStrideInElts;
488- GLint firstWrappedX;
489-}
490:LFBParameters;