[Piglit] [PATCH 2/2] Revert "arb_shader_image_load_store: fix MSVC build"
Jose Fonseca
jfonseca at vmware.com
Wed Feb 4 07:08:27 PST 2015
This reverts commit 897b549c0f793385d49f8227e2fe28109a8be74e.
Not necessary with MSVC 2013 U4.
---
tests/spec/arb_shader_image_load_store/image.h | 20 +++++++++----------
tests/spec/arb_shader_image_load_store/max-size.c | 24 ++++++++++-------------
2 files changed, 20 insertions(+), 24 deletions(-)
diff --git a/tests/spec/arb_shader_image_load_store/image.h b/tests/spec/arb_shader_image_load_store/image.h
index ba4134a..54d32ed 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);
- 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);
+ const struct image_info img = {
+ t, f,
+ image_extent_for_target(t, w, h),
+ 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)
{
- 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;
+ const struct image_info level_img = {
+ img.target, img.format,
+ image_level_size(img, l),
+ 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 dbab17c..bd08091 100644
--- a/tests/spec/arb_shader_image_load_store/max-size.c
+++ b/tests/spec/arb_shader_image_load_store/max-size.c
@@ -80,20 +80,16 @@ static bool
run_test(const struct image_target_info *target,
const struct image_extent size)
{
- 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(
+ 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(
grid, GL_FRAGMENT_SHADER,
concat(image_hunk(img, ""),
hunk("readonly uniform IMAGE_T src_img;\n"
--
2.1.0
More information about the Piglit
mailing list