Hash :
a3b220f3
Author :
Date :
2018-03-06T16:22:13
Vulkan: Adding null driver as device option Bug: angleproject:2159 Plumbing to allow VK Mock ICD to be selected as the Vulkan driver. Adding new ANGLE env var "ANGLE_VK_ICD_JSON" to point to json file of mock ICD in angle and use this to override Vk loader ICD search path. At Vulkan renderer initialization time, enable the Mock ICD if device is EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE. Default physicalDevice is still the first detected device. If Mock ICD is requested but not available, fall back to the first device that was detected. Added a VULKAN_NULL() testing config that uses Vulkan as renderer but NULL as device. Turned on Vulkan NULL testing for DrawCallPerf. Change-Id: I04e15c14e998448f8c98f9fd72e796389f297993 Reviewed-on: https://chromium-review.googlesource.com/961494 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
//
// Copyright (c) 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// DrawCallPerfParams.cpp:
// Parametrization for performance tests for ANGLE draw call overhead.
//
#include "DrawCallPerfParams.h"
#include <sstream>
std::string DrawCallPerfParams::suffix() const
{
std::stringstream strstr;
strstr << RenderTestParams::suffix();
if (numTris == 0)
{
strstr << "_validation_only";
}
if (useFBO)
{
strstr << "_render_to_texture";
}
if (eglParameters.deviceType == EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE)
{
strstr << "_null";
}
return strstr.str();
}
using namespace angle::egl_platform;
DrawCallPerfParams DrawCallPerfD3D11Params(bool useNullDevice, bool renderToTexture)
{
DrawCallPerfParams params;
params.eglParameters = useNullDevice ? D3D11_NULL() : D3D11();
params.useFBO = renderToTexture;
return params;
}
DrawCallPerfParams DrawCallPerfD3D9Params(bool useNullDevice, bool renderToTexture)
{
DrawCallPerfParams params;
params.eglParameters = useNullDevice ? D3D9_NULL() : D3D9();
params.useFBO = renderToTexture;
return params;
}
DrawCallPerfParams DrawCallPerfOpenGLOrGLESParams(bool useNullDevice, bool renderToTexture)
{
DrawCallPerfParams params;
params.eglParameters = OPENGL_OR_GLES(useNullDevice);
params.useFBO = renderToTexture;
return params;
}
DrawCallPerfParams DrawCallPerfValidationOnly()
{
DrawCallPerfParams params;
params.eglParameters = DEFAULT();
params.iterations = 10000;
params.numTris = 0;
params.runTimeSeconds = 5.0;
return params;
}
DrawCallPerfParams DrawCallPerfVulkanParams(bool useNullDevice, bool renderToTexture)
{
DrawCallPerfParams params;
params.eglParameters = useNullDevice ? VULKAN_NULL() : VULKAN();
params.useFBO = renderToTexture;
return params;
}