On Sun, Nov 10, 2013 at 9:51 AM, Chris Forbes <[email protected]> wrote: > Here is the driver-independent part of ARB_gpu_shader5's > interpolateAtCentroid, interpolateAtOffset builtins. > > Before I go further with this approach, I'd like feedback on the following: > > 1) I've (ab)used ir_var_shader_in variable mode in function signatures to > enforce the strange restrictions interpolateAt* have. Is this crazy/awful? > > 2) I intend to implement interpolateAtSample() by: > > - Adding a new builtin uniform (perhaps "gl_SamplePositionsMESA"); which > will be an array of vec2, containing the full palette of current sample > positions. This could be formally exposed by another extension at a later > point. > > - Compiling interpolateAtSample(x, sample_num) as if the shader author wrote: > interpolateAtOffset(x, gl_SamplePositionsMESA[sample_num] - vec2(0.5))
I think our Evergreen-Cayman hardware implements interpolateAtSample with interpolateAtOffset, so this looks good. Not sure about the newer chips. Marek _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
