[Piglit] [PATCH V3 4/6] ARB_sample_shading: Add test to verify the functionality of gl_SampleMask[]
Chris Forbes
chrisf at ijw.co.nz
Wed Nov 6 18:01:12 PST 2013
+ const char *sampler = num_samples ? "sampler2DMS" : "sampler2DRect";
+ const char *extension = num_samples ?
+ "#extension GL_ARB_texture_multisample : require" : "";
+ unsigned frag_alloc_len =
+ strlen(frag_template) + strlen(sampler) +
strlen(extension) + 4;
+ char *frag_1 = (char *) malloc(frag_alloc_len);
+ sprintf(frag_1, frag_template, extension, sampler,
+ num_samples ? ", i" : "");
This would be clearer with asprintf
More information about the Piglit
mailing list