Lines Matching refs:ctx
63 TestInstance* AmberTestCase::createInstance (Context& ctx) const
65 return new AmberTestInstance(ctx, m_recipe, nullptr);
68 static amber::EngineConfig* createEngineConfig (Context& ctx, vk::VkDevice customDevice)
70 vk::VkDevice dev = customDevice != nullptr ? customDevice : ctx.getDevice();
72 vk::DeviceDriver vk(ctx.getPlatformInterface(), ctx.getInstance(), dev, ctx.getUsedApiVersion());
73 vk.getDeviceQueue(dev, ctx.getUniversalQueueFamilyIndex(), 0, &queue);
75 amber::EngineConfig* vkConfig = GetVulkanConfig(ctx.getInstance(),
76 ctx.getPhysicalDevice(), dev, &ctx.getDeviceFeatures(),
77 &ctx.getDeviceFeatures2(), ctx.getInstanceExtensions(),
78 ctx.getDeviceExtensions(), ctx.getUniversalQueueFamilyIndex(),
79 queue, ctx.getInstanceProcAddr());
86 static bool isFeatureSupported(const vkt::Context& ctx, const std::string& feature)
89 return ctx.get16BitStorageFeatures().storageBuffer16BitAccess;
91 return ctx.getShaderFloat16Int8Features().shaderFloat16;
93 return ctx.getShaderFloat16Int8Features().shaderInt8;
95 return ctx.getDeviceFeatures().shaderFloat64;
97 return ctx.getDeviceFeatures().shaderInt16;
99 return ctx.getDeviceFeatures().shaderInt64;
101 return ctx.getDeviceFeatures().depthClamp;
103 return ctx.getDeviceFeatures().tessellationShader;
105 return ctx.getDeviceFeatures().shaderTessellationAndGeometryPointSize;
107 return ctx.getDeviceFeatures().geometryShader;
109 return ctx.getDeviceFeatures().fragmentStoresAndAtomics;
111 return ctx.getDeviceFeatures().vertexPipelineStoresAndAtomics;
113 return ctx.getDeviceFeatures().fillModeNonSolid;
115 return ctx.getDeviceFeatures().shaderStorageImageMultisample;
117 return ctx.getDeviceFeatures().sampleRateShading;
119 return ctx.getVariablePointersFeatures().variablePointersStorageBuffer;
121 return ctx.getVariablePointersFeatures().variablePointers;
123 return (ctx.getSubgroupProperties().supportedStages & vk::VK_SHADER_STAGE_FRAGMENT_BIT) != 0;
125 return (ctx.getSubgroupProperties().supportedOperations & vk::VK_SUBGROUP_FEATURE_VOTE_BIT) != 0;
127 return (ctx.getSubgroupProperties().supportedOperations & vk::VK_SUBGROUP_FEATURE_BASIC_BIT) != 0;
129 return (ctx.getSubgroupProperties().supportedOperations & vk::VK_SUBGROUP_FEATURE_BALLOT_BIT) != 0;
131 return ctx.get16BitStorageFeatures().storageBuffer16BitAccess;
133 return ctx.get8BitStorageFeatures().storageBuffer8BitAccess;
149 void AmberTestCase::checkSupport(Context& ctx) const
154 std::set<std::string> device_extensions(ctx.getDeviceExtensions().begin(),
155 ctx.getDeviceExtensions().end());
156 std::set<std::string> instance_extensions(ctx.getInstanceExtensions().begin(),
157 ctx.getInstanceExtensions().end());
188 if (!isFeatureSupported(ctx, feature))
202 checkImageSupport(ctx.getInstanceInterface(), ctx.getPhysicalDevice(), req);
207 ctx.getInstanceInterface().getPhysicalDeviceFormatProperties(ctx.getPhysicalDevice(), req.m_format, &prop);
216 (m_checkSupportCallback)(ctx, m_name);