Lines Matching refs:params
847 void initPrograms (SourceCollections& programCollection, const TestParams params)
888 for (deUint32 subpassNdx = 0; subpassNdx < static_cast<deUint32>(params.perSubpassSamples.size()); ++subpassNdx)
890 const TestParams::SampleCount& samples = params.perSubpassSamples[subpassNdx];
895 params.depthStencilFormat,
901 void draw (Context& context, const TestParams& params, WorkingData& wd)
914 if (params.useProgrammableSampleLocations)
940 params.colorFormat, // VkFormat format;
941 params.perSubpassSamples[subpassNdx].numColorSamples, // VkSampleCountFlagBits samples;
952 params.depthStencilFormat, // VkFormat format;
953 params.perSubpassSamples[subpassNdx].numDepthStencilSamples, // VkSampleCountFlagBits samples;
968 if (params.useProgrammableSampleLocations)
1016 renderPass = RenderPassWrapper(params.pipelineConstructionType, vk, device, &renderPassInfo);
1022 const PipelineLayoutWrapper pipelineLayout (params.pipelineConstructionType, vk, device);
1028 const VkSampleLocationsInfoEXT* pSampleLocationsInfo = (params.useProgrammableSampleLocations ? &perSubpassSampleLocationsInfo[subpassNdx] : DE_NULL);
1030 pipelines.emplace_back(vki, vk, physicalDevice, device, context.getDeviceExtensions(), params.pipelineConstructionType);
1032 wd.renderSize, getImageAspectFlags(params.depthStencilFormat), params.perSubpassSamples[subpassNdx].numCoverageSamples,
1033 /*use sample shading*/ true, params.useFragmentShadingRate, pSampleLocationsInfo);
1056 if (params.useProgrammableSampleLocations)
1092 void dispatchImageCheck (Context& context, const TestParams& params, WorkingData& wd, const deUint32 subpassNdx)
1143 const std::string shaderName ("comp_" + getSampleCountString(params.perSubpassSamples[subpassNdx]));
1182 void createPerSubpassData (Context& context, const TestParams& params, WorkingData& wd, const deUint32 subpassNdx)
1187 const TestParams::SampleCount& samples = params.perSubpassSamples[subpassNdx];
1197 params.colorFormat,
1202 subpassData.colorImage = makeImage(vk, device, params.colorFormat, wd.renderSize, samples.numColorSamples, colorImageUsageFlags);
1204 subpassData.colorImageView = makeImageView(vk, device, *subpassData.colorImage, VK_IMAGE_VIEW_TYPE_2D, params.colorFormat, makeImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, 1u));
1207 params.depthStencilFormat,
1212 subpassData.depthStencilImage = makeImage(vk, device, params.depthStencilFormat, wd.renderSize, samples.numDepthStencilSamples, depthStencilImageUsageFlags);
1214 subpassData.depthStencilImageView = makeImageView(vk, device, *subpassData.depthStencilImage, VK_IMAGE_VIEW_TYPE_2D, params.depthStencilFormat, makeImageSubresourceRange(getImageAspectFlags(params.depthStencilFormat), 0u, 1u, 0u, 1u));
1216 if (isDepthFormat(params.depthStencilFormat))
1217 subpassData.depthOnlyImageView = makeImageView(vk, device, *subpassData.depthStencilImage, VK_IMAGE_VIEW_TYPE_2D, params.depthStencilFormat, makeImageSubresourceRange(VK_IMAGE_ASPECT_DEPTH_BIT, 0u, 1u, 0u, 1u));
1219 if (isStencilFormat(params.depthStencilFormat))
1220 subpassData.stencilOnlyImageView = makeImageView(vk, device, *subpassData.depthStencilImage, VK_IMAGE_VIEW_TYPE_2D, params.depthStencilFormat, makeImageSubresourceRange(VK_IMAGE_ASPECT_STENCIL_BIT, 0u, 1u, 0u, 1u));
1245 if (params.useProgrammableSampleLocations)
1271 void checkRequirements (Context& context, TestParams params)
1275 if (params.useProgrammableSampleLocations)
1278 for (deUint32 subpassNdx = 0; subpassNdx < static_cast<deUint32>(params.perSubpassSamples.size()); ++subpassNdx)
1280 const TestParams::SampleCount& samples = params.perSubpassSamples[subpassNdx];
1281 checkSampleRequirements(context, samples.numColorSamples, samples.numDepthStencilSamples, !params.useProgrammableSampleLocations);
1287 if (params.useFragmentShadingRate)
1308 for (const TestParams::SampleCount& samples : params.perSubpassSamples)
1327 checkPipelineConstructionRequirements(context.getInstanceInterface(), context.getPhysicalDevice(), params.pipelineConstructionType);
1331 tcu::TestStatus test (Context& context, const TestParams params)
1337 if (params.useProgrammableSampleLocations)
1354 for (deUint32 subpassNdx = 0; subpassNdx < static_cast<deUint32>(params.perSubpassSamples.size()); ++subpassNdx)
1356 if ((wd.sampleLocationsProperties.sampleLocationSampleCounts & params.perSubpassSamples[subpassNdx].numCoverageSamples) == 0u)
1362 for (deUint32 subpassNdx = 0; subpassNdx < static_cast<deUint32>(params.perSubpassSamples.size()); ++subpassNdx)
1365 createPerSubpassData(context, params, wd, subpassNdx);
1369 draw (context, params, wd);
1372 for (deUint32 subpassNdx = 0; subpassNdx < static_cast<deUint32>(params.perSubpassSamples.size()); ++subpassNdx)
1373 dispatchImageCheck (context, params, wd, subpassNdx);
1376 for (deUint32 subpassNdx = 0; subpassNdx < static_cast<deUint32>(params.perSubpassSamples.size()); ++subpassNdx)
1379 const bool hasDepth = isDepthFormat(params.depthStencilFormat);
1380 const bool hasStencil = isStencilFormat(params.depthStencilFormat);
1387 const TestParams::SampleCount& samples = params.perSubpassSamples[subpassNdx];
1459 void initPrograms (SourceCollections& programCollection, const TestParams params)
1502 if (params.numColorSamples == VK_SAMPLE_COUNT_1_BIT)
1504 const deUint32 expectedMask = ((1u << static_cast<deUint32>(params.numCoverageSamples)) - 1u);
1520 << " if (gl_SampleID >= " << static_cast<deUint32>(params.numColorSamples) << ") // number of color samples, should not happen\n"
1533 void drawResolve (Context& context, const TestParams& params, WorkingData& wd)
1539 const bool needResolve = (params.numColorSamples != VK_SAMPLE_COUNT_1_BIT);
1556 params.colorFormat, // VkFormat format;
1557 params.numColorSamples, // VkSampleCountFlagBits samples;
1568 params.depthStencilFormat, // VkFormat format;
1569 params.numDepthStencilSamples, // VkSampleCountFlagBits samples;
1585 params.colorFormat, // VkFormat format;
1628 renderPass = RenderPassWrapper(params.pipelineConstructionType, vk, device, &renderPassInfo);
1634 const PipelineLayoutWrapper pipelineLayout (params.pipelineConstructionType, vk, device);
1636 const bool sampleShading = (params.numColorSamples != VK_SAMPLE_COUNT_1_BIT);
1638 GraphicsPipelineWrapper pipeline (vki, vk, physicalDevice, device, context.getDeviceExtensions(), params.pipelineConstructionType);
1643 subpassNdx, wd.renderSize, getImageAspectFlags(params.depthStencilFormat),
1644 params.numCoverageSamples, sampleShading, false);
1676 void checkRequirements (Context& context, TestParams params)
1680 checkSampleRequirements(context, params.numColorSamples, params.numDepthStencilSamples, false /* require standard sample locations */);
1681 checkPipelineConstructionRequirements(context.getInstanceInterface(), context.getPhysicalDevice(), params.pipelineConstructionType);
1685 tcu::TestStatus test (Context& context, const TestParams params)
1701 params.colorFormat,
1704 params.numColorSamples);
1706 wd.colorImage = makeImage(vk, device, params.colorFormat, wd.renderSize, params.numColorSamples, colorImageUsageFlags);
1708 wd.colorImageView = makeImageView(vk, device, *wd.colorImage, VK_IMAGE_VIEW_TYPE_2D, params.colorFormat, makeImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, 1u));
1710 if (params.numColorSamples != VK_SAMPLE_COUNT_1_BIT)
1712 wd.resolveImage = makeImage(vk, device, params.colorFormat, wd.renderSize, VK_SAMPLE_COUNT_1_BIT, colorImageUsageFlags);
1714 wd.resolveImageView = makeImageView(vk, device, *wd.resolveImage, VK_IMAGE_VIEW_TYPE_2D, params.colorFormat, makeImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, 1u));
1718 wd.colorBufferSize = static_cast<VkDeviceSize>(tcu::getPixelSize(mapVkFormat(params.colorFormat)) * wd.renderSize.x() * wd.renderSize.y());
1726 params.depthStencilFormat,
1729 params.numDepthStencilSamples);
1731 wd.depthStencilImage = makeImage(vk, device, params.depthStencilFormat, wd.renderSize, params.numDepthStencilSamples, depthStencilImageUsageFlags);
1733 wd.depthStencilImageView = makeImageView(vk, device, *wd.depthStencilImage, VK_IMAGE_VIEW_TYPE_2D, params.depthStencilFormat, makeImageSubresourceRange(getImageAspectFlags(params.depthStencilFormat), 0u, 1u, 0u, 1u));
1735 if (isDepthFormat(params.depthStencilFormat))
1736 wd.depthOnlyImageView = makeImageView(vk, device, *wd.depthStencilImage, VK_IMAGE_VIEW_TYPE_2D, params.depthStencilFormat, makeImageSubresourceRange(VK_IMAGE_ASPECT_DEPTH_BIT, 0u, 1u, 0u, 1u));
1738 if (isStencilFormat(params.depthStencilFormat))
1739 wd.stencilOnlyImageView = makeImageView(vk, device, *wd.depthStencilImage, VK_IMAGE_VIEW_TYPE_2D, params.depthStencilFormat, makeImageSubresourceRange(VK_IMAGE_ASPECT_STENCIL_BIT, 0u, 1u, 0u, 1u));
1743 drawResolve(context, params, wd);
1747 const tcu::ConstPixelBufferAccess image (tcu::ConstPixelBufferAccess(mapVkFormat(params.colorFormat), tcu::IVec3(wd.renderSize.x(), wd.renderSize.y(), 1),wd.colorBufferAlloc->getHostPtr()));
1917 VerifySamples::TestParams params;
1918 params.pipelineConstructionType = pipelineConstructionType;
1919 params.perSubpassSamples.push_back(samples);
1920 params.useProgrammableSampleLocations = (locationsGroups[groupNdx] == programmableLocationsGroup.get());
1921 params.useFragmentShadingRate = useFragmentShadingRate;
1929 params.colorFormat = *pColorFormat;
1930 params.depthStencilFormat = *pDepthStencilFormat;
1934 getFormatCaseName(params.colorFormat, params.depthStencilFormat).c_str(),
1937 VerifySamples::test, params);
1946 VerifySamples::TestParams params;
1947 params.pipelineConstructionType = pipelineConstructionType;
1948 params.useProgrammableSampleLocations = (locationsGroups[groupNdx] == programmableLocationsGroup.get());
1949 params.useFragmentShadingRate = useFragmentShadingRate;
1957 params.perSubpassSamples.push_back(samples);
1965 params.colorFormat = *pColorFormat;
1966 params.depthStencilFormat = *pDepthStencilFormat;
1970 getFormatCaseName(params.colorFormat, params.depthStencilFormat).c_str(),
1973 VerifySamples::test, params);
1991 ShaderBuiltins::TestParams params;
1992 params.pipelineConstructionType = pipelineConstructionType;
1993 params.numColorSamples = singlePassCases[caseNdx].colorSamples;
1994 params.numDepthStencilSamples = singlePassCases[caseNdx].depthStencilSamples;
1995 params.numCoverageSamples = de::max(params.numColorSamples, params.numDepthStencilSamples);
1998 rootGroup->getTestContext(), getSampleCountGroupName(params.numCoverageSamples, params.numColorSamples, params.numDepthStencilSamples).c_str(), ""));
2003 params.colorFormat = *pColorFormat;
2004 params.depthStencilFormat = *pDepthStencilFormat;
2008 getFormatCaseName(params.colorFormat, params.depthStencilFormat).c_str(),
2012 params);