----- Original Message ----- > Am 22.03.2013 13:28, schrieb Jose Fonseca: > >> @@ -1009,6 +1020,17 @@ lp_blend_type_from_format_desc(const struct > >> util_format_description *format_desc > >> unsigned i; > >> unsigned chan; > >> > >> + if (format_desc->format == PIPE_FORMAT_R11G11B10_FLOAT) { > >> + /* always use ordinary floats for blending */ > >> + type->floating = true; > >> + type->fixed = false; > >> + type->sign = true; > > > > R11G11B10_FLOAT is always positive, so you could set sign to false here. It > > might save some 0 comparisons. > Hmm I don't think that's quite right. OpenGL states that blending should > always be done with signed arithmetic even for packed floats (though the > incoming fragment shader colors may be subject to clamping depending on > clamping controls), clamping be done afterwards when packing. > Also, we do the clamping as part of the packing in any case currently > (if we know that it's positive we could skip the min() instruction > though we'd need to pass the lp_type).
Yes, you're right > >> + type->norm = false; > >> + type->width = 32; > >> + type->length = 4; > >> + return; > >> + } > >> + > >> for (i = 0; i < 4; i++) > >> if (format_desc->channel[i].type != UTIL_FORMAT_TYPE_VOID) > >> break; Jose _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev