glw::GLuint id;
} shader[] = { { vertex_shader, GL_VERTEX_SHADER, 0 }, { s_fragment_shader, GL_FRAGMENT_SHADER, 0 } };
- glw::GLuint const shader_count = sizeof(shader) / sizeof(shader[0]);
+ glw::GLuint const shader_count = DE_LENGTH_OF_ARRAY(shader);
glw::GLuint po = 0;
glw::GLuint id;
} shader[] = { { s_vertex_shader, GL_VERTEX_SHADER, 0 }, { s_fragment_shader, GL_FRAGMENT_SHADER, 0 } };
- glw::GLuint const shader_count = sizeof(shader) / sizeof(shader[0]);
+ glw::GLuint const shader_count = DE_LENGTH_OF_ARRAY(shader);
try
{
glw::GLuint id;
} shader[] = { { s_vertex_shader, GL_VERTEX_SHADER, 0 }, { s_fragment_shader, GL_FRAGMENT_SHADER, 0 } };
- glw::GLuint const shader_count = sizeof(shader) / sizeof(shader[0]);
+ glw::GLuint const shader_count = DE_LENGTH_OF_ARRAY(shader);
try
{
0 },
{ { s_fragment_shader, DE_NULL, DE_NULL }, 1, GL_FRAGMENT_SHADER, 0 } };
- glw::GLuint const shader_count = sizeof(shader) / sizeof(shader[0]);
+ glw::GLuint const shader_count = DE_LENGTH_OF_ARRAY(shader);
try
{
glw::GLuint id;
} shader[] = { { s_vertex_shader, GL_VERTEX_SHADER, 0 }, { s_fragment_shader, GL_FRAGMENT_SHADER, 0 } };
- glw::GLuint const shader_count = sizeof(shader) / sizeof(shader[0]);
+ glw::GLuint const shader_count = DE_LENGTH_OF_ARRAY(shader);
try
{
{
bad_type++;
is_accepted_type = false;
- for (glw::GLuint i = 0; i < sizeof(accepted_types) / sizeof(accepted_types[0]); ++i)
+ for (glw::GLuint i = 0; i < DE_LENGTH_OF_ARRAY(accepted_types); ++i)
{
if (accepted_types[i] == bad_type)
{
{
bad_pname++;
is_accepted_pname = false;
- for (glw::GLuint i = 0; i < sizeof(accepted_pnames) / sizeof(accepted_pnames[0]); ++i)
+ for (glw::GLuint i = 0; i < DE_LENGTH_OF_ARRAY(accepted_pnames); ++i)
{
if (accepted_pnames[i] == bad_pname)
{
int pad[3];
vec4 position;
} data[6];
- memset(data, 0, sizeof(data));
+ deMemset((void *)data, 0, sizeof(data));
glGenBuffers(1, &m_storage_buffer);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, m_storage_buffer);
glBufferData(GL_SHADER_STORAGE_BUFFER, sizeof(data), data, GL_DYNAMIC_DRAW);
};
for (size_t invalid_declarations_index = 0;
- invalid_declarations_index < sizeof(invalid_declarations) / sizeof(invalid_declarations[0]);
+ invalid_declarations_index < DE_LENGTH_OF_ARRAY(invalid_declarations);
invalid_declarations_index++)
{
std::string shader_source;
};
for (size_t invalid_declarations_index = 0;
- invalid_declarations_index < sizeof(invalid_declarations) / sizeof(invalid_declarations[0]);
+ invalid_declarations_index < DE_LENGTH_OF_ARRAY(invalid_declarations);
invalid_declarations_index++)
{
std::string shader_source;
std::string non_constant_variable_declaration = " uint a = 2u;\n";
for (size_t invalid_declarations_index = 0;
- invalid_declarations_index < sizeof(invalid_declarations) / sizeof(invalid_declarations[0]);
+ invalid_declarations_index < DE_LENGTH_OF_ARRAY(invalid_declarations);
invalid_declarations_index++)
{
std::string shader_source;
void initProgramsPointSize (SourceCollections& programCollection)
{
- addSimplePrograms(programCollection, 0.75f * RENDER_SIZE);
+ addSimplePrograms(programCollection, 0.75f * static_cast<float>(RENDER_SIZE));
}
//! Primitives fully inside the clip volume.
submitCommandsAndWait(m_vk, device, queue, m_cmdBuffer.get());
// Validation
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
submitCommandsAndWait(m_vk, device, queue, m_cmdBuffer.get());
// Validation
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
submitCommandsAndWait(m_vk, device, queue, m_cmdBuffer.get());
// Validation
- tcu::TextureLevel refImage (vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::TextureLevel refImage (vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
tcu::clear(refImage.getAccess(), tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f));
std::vector<tcu::Vec4> vertices;
submitCommandsAndWait(m_vk, vkDevice, queue, m_cmdBuffer.get());
// Validation
- tcu::TextureLevel refImage (vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::TextureLevel refImage (vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
tcu::clear(refImage.getAccess(), tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f));
std::vector<tcu::Vec4> vertices;
submitCommandsAndWait(m_vk, vkDevice, queue, m_cmdBuffer.get());
// Validation
- tcu::TextureLevel refImage (vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::TextureLevel refImage (vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
tcu::clear(refImage.getAccess(), tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f));
for (std::vector<vk::VkDrawIndirectCommand>::const_iterator it = m_data.commands.begin(); it != m_data.commands.end(); ++it)
submitCommandsAndWait(m_vk, vkDevice, queue, m_cmdBuffer.get());
// Validation
- tcu::TextureLevel refImage (vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::TextureLevel refImage (vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
tcu::clear(refImage.getAccess(), tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f));
for (std::vector<vk::VkDrawIndexedIndirectCommand>::const_iterator cmd = m_data.commands.begin(); cmd != m_data.commands.end(); ++cmd)
// Validation - draw
- tcu::Texture2D referenceFrame(mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
submitCommandsAndWait(m_vk, device, queue, m_cmdBuffer.get());
// Validation
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
// Validation
VK_CHECK(m_vk.queueWaitIdle(queue));
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
submitCommandsAndWait(m_vk, device, queue, m_cmdBuffer.get());
// Validation
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
// Validation
VK_CHECK(m_vk.queueWaitIdle(queue));
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5 + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const Vec4 allColors[] = { Vec4(1.0f), Vec4(0.0f, 0.0f, 1.0f, 1.0f), Vec4(0.0f, 1.0f, 0.0f, 1.0f) };
const int numInstances = isInstanced() ? MAX_INSTANCE_COUNT : 1;
const int numIndirectDraws = isMultiDraw() ? MAX_INDIRECT_DRAW_COUNT : 1;
- const int rectWidth = static_cast<int>(WIDTH * 0.6f / 2.0f);
- const int rectHeight = static_cast<int>(HEIGHT * 0.6f / 2.0f);
+ const int rectWidth = static_cast<int>(static_cast<float>(WIDTH) * 0.6f / 2.0f);
+ const int rectHeight = static_cast<int>(static_cast<float>(HEIGHT) * 0.6f / 2.0f);
DE_ASSERT(DE_LENGTH_OF_ARRAY(perInstanceOffset) >= numInstances);
DE_ASSERT(DE_LENGTH_OF_ARRAY(allColors) >= numInstances && DE_LENGTH_OF_ARRAY(allColors) >= numIndirectDraws);
{
const Vec2 offset = perInstanceOffset[instanceNdx] + perDrawOffset[drawNdx];
const Vec4& color = allColors[isMultiDraw() ? drawNdx : instanceNdx];
- int x = static_cast<int>(WIDTH * (1.0f - 0.3f + offset.x()) / 2.0f);
- int y = static_cast<int>(HEIGHT * (1.0f - 0.3f + offset.y()) / 2.0f);
+ int x = static_cast<int>(static_cast<float>(WIDTH) * (1.0f - 0.3f + offset.x()) / 2.0f);
+ int y = static_cast<int>(static_cast<float>(HEIGHT) * (1.0f - 0.3f + offset.y()) / 2.0f);
tcu::clear(tcu::getSubregion(refImage, x, y, rectWidth, rectHeight), color);
}
// Validate
{
- tcu::TextureLevel referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), static_cast<int>(0.5f + WIDTH), static_cast<int>(0.5f + HEIGHT));
+ tcu::TextureLevel referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), static_cast<int>(0.5f + static_cast<float>(WIDTH)), static_cast<int>(0.5f + static_cast<float>(HEIGHT)));
drawReferenceImage(referenceFrame.getAccess());
submitCommandsAndWait(m_vk, device, queue, m_cmdBuffer.get());
// Validation
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
// Validation
VK_CHECK(m_vk.queueWaitIdle(queue));
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
//validation
{
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
// validation
{
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
const vk::VkDevice device = m_context.getDevice();
// Prepare depth image
- tcu::Texture2D depthData(vk::mapVkFormat(m_depthAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D depthData(vk::mapVkFormat(m_depthAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
depthData.allocLevel(0);
const deInt32 depthDataWidth = depthData.getWidth();
// Validation
{
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
// validation
{
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
// validation
{
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
submitCommandsAndWait(m_vk, device, queue, m_cmdBuffer.get());
//validation
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
submitCommandsAndWait(m_vk, device, queue, m_cmdBuffer.get());
//validation
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
submitCommandsAndWait(m_vk, device, queue, m_cmdBuffer.get());
//validation
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
{
VK_CHECK(m_vk.queueWaitIdle(queue));
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
// validation
{
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
// validation
{
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
virtual void setDynamicStates(void)
{
- const vk::VkViewport viewport = { 0.0f, 0.0f, (float)WIDTH * 2, (float)HEIGHT * 2, 0.0f, 0.0f };
+ const vk::VkViewport viewport = { 0.0f, 0.0f, static_cast<float>(WIDTH) * 2.0f, static_cast<float>(HEIGHT) * 2.0f, 0.0f, 0.0f };
const vk::VkRect2D scissor = { { 0, 0 }, { WIDTH, HEIGHT } };
setDynamicViewportState(1, &viewport, &scissor);
virtual tcu::Texture2D buildReferenceFrame (void)
{
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
virtual tcu::Texture2D buildReferenceFrame (void)
{
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
// validation
{
- tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5 + WIDTH), (int)(0.5 + HEIGHT));
+ tcu::Texture2D referenceFrame(vk::mapVkFormat(m_colorAttachmentFormat), (int)(0.5f + static_cast<float>(WIDTH)), (int)(0.5f + static_cast<float>(HEIGHT)));
referenceFrame.allocLevel(0);
const deInt32 frameWidth = referenceFrame.getWidth();
vk,
device,
memAlloc,
- makeImageCreateInfo(resolution, colorFormat, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT),
+ makeImageCreateInfo(resolution, colorFormat, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT),
MemoryRequirement::Any
);
const Unique<VkRenderPass> renderPass (makeRenderPass(vk, device, colorFormat));
{
switch (tcu::getTextureChannelClass(format.type))
{
- case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: return BlendTest::QUAD_COUNT / static_cast<float>((1 << numBits) - 1);
- case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: return BlendTest::QUAD_COUNT / static_cast<float>((1 << (numBits - 1)) - 1);
+ case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: return static_cast<float>(BlendTest::QUAD_COUNT) / static_cast<float>((1 << numBits) - 1);
+ case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: return static_cast<float>(BlendTest::QUAD_COUNT) / static_cast<float>((1 << (numBits - 1)) - 1);
default:
break;
}
const string opName (op);
const deUint32 opIndex = (opName == "OpCompositeInsert") ? 0
: (opName == "OpCompositeExtract") ? 1
- : -1;
+ : std::numeric_limits<deUint32>::max();
const StringTemplate preMain
(
enum
{
NUM_INTERPOLATIONS = VARYINGINTERPOLATION_RANDOM, // VARYINGINTERPOLATION_RANDOM is one after last fully specified interpolation
- INTERFACEFLAGS_LAST = BINDING_LAST * NUM_INTERPOLATIONS * NUM_INTERPOLATIONS
+ INTERFACEFLAGS_LAST = static_cast<int>(BINDING_LAST) * static_cast<int>(NUM_INTERPOLATIONS) * static_cast<int>(NUM_INTERPOLATIONS)
};
for (deUint32 flags = 0; flags < INTERFACEFLAGS_LAST; ++flags)
if (m_spec.instanced)
{
// store single basic primitive
- primitiveData[0] = tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f);
- primitiveData[1] = tcu::Vec4(0.0f, 2.0f / GRID_SIZE, 0.0f, 1.0f);
- primitiveData[2] = tcu::Vec4(2.0f / GRID_SIZE, 2.0f / GRID_SIZE, 0.0f, 1.0f);
- primitiveData[3] = tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f);
- primitiveData[4] = tcu::Vec4(2.0f / GRID_SIZE, 2.0f / GRID_SIZE, 0.0f, 1.0f);
- primitiveData[5] = tcu::Vec4(2.0f / GRID_SIZE, 0.0f, 0.0f, 1.0f);
+ primitiveData[0] = tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f);
+ primitiveData[1] = tcu::Vec4(0.0f, 2.0f / float(GRID_SIZE), 0.0f, 1.0f);
+ primitiveData[2] = tcu::Vec4(2.0f / float(GRID_SIZE), 2.0f / float(GRID_SIZE), 0.0f, 1.0f);
+ primitiveData[3] = tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f);
+ primitiveData[4] = tcu::Vec4(2.0f / float(GRID_SIZE), 2.0f / float(GRID_SIZE), 0.0f, 1.0f);
+ primitiveData[5] = tcu::Vec4(2.0f / float(GRID_SIZE), 0.0f, 0.0f, 1.0f);
}
else
{
for (int primNdx = 0; primNdx < numPositionCells; ++primNdx)
{
- positionData[primNdx*6 + 0] = tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f);
- positionData[primNdx*6 + 1] = tcu::Vec4(0.0f, 2.0f / GRID_SIZE, 0.0f, 1.0f);
- positionData[primNdx*6 + 2] = tcu::Vec4(2.0f / GRID_SIZE, 2.0f / GRID_SIZE, 0.0f, 1.0f);
- positionData[primNdx*6 + 3] = tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f);
- positionData[primNdx*6 + 4] = tcu::Vec4(2.0f / GRID_SIZE, 2.0f / GRID_SIZE, 0.0f, 1.0f);
- positionData[primNdx*6 + 5] = tcu::Vec4(2.0f / GRID_SIZE, 0.0f, 0.0f, 1.0f);
+ positionData[primNdx*6 + 0] = tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f);
+ positionData[primNdx*6 + 1] = tcu::Vec4(0.0f, 2.0f / float(GRID_SIZE), 0.0f, 1.0f);
+ positionData[primNdx*6 + 2] = tcu::Vec4(2.0f / float(GRID_SIZE), 2.0f / float(GRID_SIZE), 0.0f, 1.0f);
+ positionData[primNdx*6 + 3] = tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f);
+ positionData[primNdx*6 + 4] = tcu::Vec4(2.0f / float(GRID_SIZE), 2.0f / float(GRID_SIZE), 0.0f, 1.0f);
+ positionData[primNdx*6 + 5] = tcu::Vec4(2.0f / float(GRID_SIZE), 0.0f, 0.0f, 1.0f);
}
// color & offset