Jakob Bornecrantz wrote: > Hi Brian, Keith, Zack et al. > > So I tried to get i915g running again and it looks like there is a > RGBA vs BGRA bug in the draw module. I have attached two patches that > I would like to have some comments on before commit. > > Patch 1 removes a bunch of switch cases that was strew all over the > draw module that all pretty much did exactly the same thing. Which > made it hard to fix the RGBA issue for i915g. In draw_pipe_vbuf and > draw_pt_emit the format for EMIT_4UB was one thing and in > draw_pt_fetch_emit it was another. In light of the format clean up I > standardized on following the same as the float formats for EMIT_4UB. > > Patch 2 then introduces EMIT_4UB_BGRA and is used by i915g to make the > colors look correct again. > > Comments please. > > Cheers Jakob. >
The new translsation function: static INLINE unsigned draw_translate_vinfo_format_size(unsigned format) and the existing: static INLINE unsigned draw_translate_vinfo_format(unsigned format ) should probably both take a 'enum attrib_emit' instead of unsigned int. Also, the default switch cases should probably have an assert(0 && "unexpected format") in case someone were to add a new format value but forget to update the helper functions. Looks good otherwise. -Brian ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev