Francisco Jerez <[email protected]> writes: > Francisco Jerez <[email protected]> writes: > >> Brian Paul <[email protected]> writes: >> >>> MSVC doesn't seem to like function calls inside struct initializers. >> >> That's awful. But fine: >> Reviewed-by: Francisco Jerez <[email protected]> >> > Actually it's surprising that you got it to build with so few changes. > I'd expect you to find *many* more function calls inside struct > initializers. Does it actually work with this change or did you forget > to include some files? >
Brian, if that's the case don't bother to fix all the function calls in
struct initalizers, just let me know, I'd like to try a less intrusive
solution.
>>> ---
>>> tests/spec/arb_shader_image_load_store/image.h | 20 +++++++++----------
>>> tests/spec/arb_shader_image_load_store/max-size.c | 24
>>> +++++++++++++----------
>>> 2 files changed, 24 insertions(+), 20 deletions(-)
>>>
>>> diff --git a/tests/spec/arb_shader_image_load_store/image.h
>>> b/tests/spec/arb_shader_image_load_store/image.h
>>> index 54d32ed..ba4134a 100644
>>> --- a/tests/spec/arb_shader_image_load_store/image.h
>>> +++ b/tests/spec/arb_shader_image_load_store/image.h
>>> @@ -316,11 +316,11 @@ image_info(GLenum target, GLenum format, unsigned w,
>>> unsigned h)
>>> {
>>> const struct image_target_info *t = get_image_target(target);
>>> const struct image_format_info *f = get_image_format(format);
>>> - const struct image_info img = {
>>> - t, f,
>>> - image_extent_for_target(t, w, h),
>>> - image_format_epsilon(f)
>>> - };
>>> + struct image_info img;
>>> + img.target = t;
>>> + img.format = f;
>>> + img.size = image_extent_for_target(t, w, h);
>>> + img.epsilon = image_format_epsilon(f);
>>>
>>> return img;
>>> }
>>> @@ -374,11 +374,11 @@ image_level_offset(const struct image_info img,
>>> unsigned l)
>>> static inline struct image_info
>>> image_info_for_level(struct image_info img, unsigned l)
>>> {
>>> - const struct image_info level_img = {
>>> - img.target, img.format,
>>> - image_level_size(img, l),
>>> - img.epsilon
>>> - };
>>> + struct image_info level_img;
>>> + level_img.target = img.target;
>>> + level_img.format = img.format;
>>> + level_img.size = image_level_size(img, l);
>>> + level_img.epsilon = img.epsilon;
>>>
>>> return level_img;
>>> }
>>> diff --git a/tests/spec/arb_shader_image_load_store/max-size.c
>>> b/tests/spec/arb_shader_image_load_store/max-size.c
>>> index bd08091..dbab17c 100644
>>> --- a/tests/spec/arb_shader_image_load_store/max-size.c
>>> +++ b/tests/spec/arb_shader_image_load_store/max-size.c
>>> @@ -80,16 +80,20 @@ static bool
>>> run_test(const struct image_target_info *target,
>>> const struct image_extent size)
>>> {
>>> - const struct grid_info grid = {
>>> - GL_FRAGMENT_SHADER_BIT,
>>> - get_image_format(GL_RGBA32F),
>>> - image_optimal_extent(size)
>>> - };
>>> - const struct image_info img = {
>>> - target, grid.format, size,
>>> - image_format_epsilon(grid.format)
>>> - };
>>> - GLuint prog = generate_program(
>>> + struct grid_info grid;
>>> + struct image_info img;
>>> + GLuint prog;
>>> +
>>> + grid.stages = GL_FRAGMENT_SHADER_BIT;
>>> + grid.format = get_image_format(GL_RGBA32F);
>>> + grid.size = image_optimal_extent(size);
>>> +
>>> + img.target = target;
>>> + img.format = grid.format;
>>> + img.size = size;
>>> + img.epsilon = image_format_epsilon(grid.format);
>>> +
>>> + prog = generate_program(
>>> grid, GL_FRAGMENT_SHADER,
>>> concat(image_hunk(img, ""),
>>> hunk("readonly uniform IMAGE_T src_img;\n"
>>> --
>>> 1.9.1
>>>
>>> _______________________________________________
>>> Piglit mailing list
>>> [email protected]
>>> http://lists.freedesktop.org/mailman/listinfo/piglit
> _______________________________________________
> Piglit mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/piglit
pgpy1XbO5CreW.pgp
Description: PGP signature
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
