Skip to content

Commit

Permalink
Merge pull request #10168 from hrydgard/gpu-vendor-detect
Browse files Browse the repository at this point in the history
Cleanup GPU vendor detection a bit, use it to avoid the issue mentioned in #9545
  • Loading branch information
hrydgard committed Nov 21, 2017
2 parents 2e9d59a + 2c86217 commit 33e500a
Show file tree
Hide file tree
Showing 13 changed files with 88 additions and 24 deletions.
2 changes: 1 addition & 1 deletion GPU/Common/SoftwareTransformCommon.cpp
Expand Up @@ -400,7 +400,7 @@ void SoftwareTransform(
int scissorY2 = gstate.getScissorY2() + 1; int scissorY2 = gstate.getScissorY2() + 1;
reallyAClear = IsReallyAClear(transformed, maxIndex, scissorX2, scissorY2); reallyAClear = IsReallyAClear(transformed, maxIndex, scissorX2, scissorY2);
} }
if (reallyAClear && gl_extensions.gpuVendor != GPU_VENDOR_POWERVR) { if (reallyAClear && gl_extensions.gpuVendor != GPU_VENDOR_IMGTEC) {
// If alpha is not allowed to be separate, it must match for both depth/stencil and color. Vulkan requires this. // If alpha is not allowed to be separate, it must match for both depth/stencil and color. Vulkan requires this.
bool alphaMatchesColor = gstate.isClearModeColorMask() == gstate.isClearModeAlphaMask(); bool alphaMatchesColor = gstate.isClearModeColorMask() == gstate.isClearModeAlphaMask();
bool depthMatchesStencil = gstate.isClearModeAlphaMask() == gstate.isClearModeDepthMask(); bool depthMatchesStencil = gstate.isClearModeAlphaMask() == gstate.isClearModeDepthMask();
Expand Down
4 changes: 3 additions & 1 deletion GPU/D3D11/GPU_D3D11.cpp
Expand Up @@ -206,7 +206,9 @@ void GPU_D3D11::CheckGPUFeatures() {


features |= GPU_SUPPORTS_BLEND_MINMAX; features |= GPU_SUPPORTS_BLEND_MINMAX;
features |= GPU_PREFER_CPU_DOWNLOAD; features |= GPU_PREFER_CPU_DOWNLOAD;
if (!PSP_CoreParameter().compat.flags().DisableAccurateDepth) {
// Accurate depth is required on AMD so we ignore the compat flag to disable it on those. See #9545
if (!PSP_CoreParameter().compat.flags().DisableAccurateDepth || draw_->GetDeviceCaps().vendor == Draw::GPUVendor::AMD) {
features |= GPU_SUPPORTS_ACCURATE_DEPTH; // Breaks text in PaRappa for some reason. features |= GPU_SUPPORTS_ACCURATE_DEPTH; // Breaks text in PaRappa for some reason.
} }


Expand Down
4 changes: 3 additions & 1 deletion GPU/Directx9/GPU_DX9.cpp
Expand Up @@ -187,7 +187,9 @@ void GPU_DX9::CheckGPUFeatures() {
features |= GPU_SUPPORTS_BLEND_MINMAX; features |= GPU_SUPPORTS_BLEND_MINMAX;
features |= GPU_SUPPORTS_TEXTURE_LOD_CONTROL; features |= GPU_SUPPORTS_TEXTURE_LOD_CONTROL;
features |= GPU_PREFER_CPU_DOWNLOAD; features |= GPU_PREFER_CPU_DOWNLOAD;
if (!PSP_CoreParameter().compat.flags().DisableAccurateDepth) {
// Accurate depth is required on AMD so we ignore the compat flag to disable it on those. See #9545
if (!PSP_CoreParameter().compat.flags().DisableAccurateDepth || draw_->GetDeviceCaps().vendor == Draw::GPUVendor::AMD) {
features |= GPU_SUPPORTS_ACCURATE_DEPTH; features |= GPU_SUPPORTS_ACCURATE_DEPTH;
} }


Expand Down
8 changes: 4 additions & 4 deletions GPU/GLES/FragmentShaderGeneratorGLES.cpp
Expand Up @@ -243,7 +243,7 @@ bool GenerateFragmentShader(const ShaderID &id, char *buffer, uint64_t *uniformM
if (enableAlphaTest && !alphaTestAgainstZero) { if (enableAlphaTest && !alphaTestAgainstZero) {
if (bitwiseOps) { if (bitwiseOps) {
WRITE(p, "int roundAndScaleTo255i(in float x) { return int(floor(x * 255.0 + 0.5)); }\n"); WRITE(p, "int roundAndScaleTo255i(in float x) { return int(floor(x * 255.0 + 0.5)); }\n");
} else if (gl_extensions.gpuVendor == GPU_VENDOR_POWERVR) { } else if (gl_extensions.gpuVendor == GPU_VENDOR_IMGTEC) {
WRITE(p, "float roundTo255thf(in mediump float x) { mediump float y = x + (0.5/255.0); return y - fract(y * 255.0) * (1.0 / 255.0); }\n"); WRITE(p, "float roundTo255thf(in mediump float x) { mediump float y = x + (0.5/255.0); return y - fract(y * 255.0) * (1.0 / 255.0); }\n");
} else { } else {
WRITE(p, "float roundAndScaleTo255f(in float x) { return floor(x * 255.0 + 0.5); }\n"); WRITE(p, "float roundAndScaleTo255f(in float x) { return floor(x * 255.0 + 0.5); }\n");
Expand All @@ -252,7 +252,7 @@ bool GenerateFragmentShader(const ShaderID &id, char *buffer, uint64_t *uniformM
if (enableColorTest && !colorTestAgainstZero) { if (enableColorTest && !colorTestAgainstZero) {
if (bitwiseOps) { if (bitwiseOps) {
WRITE(p, "ivec3 roundAndScaleTo255iv(in vec3 x) { return ivec3(floor(x * 255.0 + 0.5)); }\n"); WRITE(p, "ivec3 roundAndScaleTo255iv(in vec3 x) { return ivec3(floor(x * 255.0 + 0.5)); }\n");
} else if (gl_extensions.gpuVendor == GPU_VENDOR_POWERVR) { } else if (gl_extensions.gpuVendor == GPU_VENDOR_IMGTEC) {
WRITE(p, "vec3 roundTo255thv(in vec3 x) { vec3 y = x + (0.5/255.0); return y - fract(y * 255.0) * (1.0 / 255.0); }\n"); WRITE(p, "vec3 roundTo255thv(in vec3 x) { vec3 y = x + (0.5/255.0); return y - fract(y * 255.0) * (1.0 / 255.0); }\n");
} else { } else {
WRITE(p, "vec3 roundAndScaleTo255v(in vec3 x) { return floor(x * 255.0 + 0.5); }\n"); WRITE(p, "vec3 roundAndScaleTo255v(in vec3 x) { return floor(x * 255.0 + 0.5); }\n");
Expand Down Expand Up @@ -436,7 +436,7 @@ bool GenerateFragmentShader(const ShaderID &id, char *buffer, uint64_t *uniformM
if (alphaTestFuncs[alphaTestFunc][0] != '#') { if (alphaTestFuncs[alphaTestFunc][0] != '#') {
if (bitwiseOps) { if (bitwiseOps) {
WRITE(p, " if ((roundAndScaleTo255i(v.a) & u_alphacolormask.a) %s int(u_alphacolorref.a)) discard;\n", alphaTestFuncs[alphaTestFunc]); WRITE(p, " if ((roundAndScaleTo255i(v.a) & u_alphacolormask.a) %s int(u_alphacolorref.a)) discard;\n", alphaTestFuncs[alphaTestFunc]);
} else if (gl_extensions.gpuVendor == GPU_VENDOR_POWERVR) { } else if (gl_extensions.gpuVendor == GPU_VENDOR_IMGTEC) {
// Work around bad PVR driver problem where equality check + discard just doesn't work. // Work around bad PVR driver problem where equality check + discard just doesn't work.
if (alphaTestFunc != GE_COMP_NOTEQUAL) { if (alphaTestFunc != GE_COMP_NOTEQUAL) {
WRITE(p, " if (roundTo255thf(v.a) %s u_alphacolorref.a) discard;\n", alphaTestFuncs[alphaTestFunc]); WRITE(p, " if (roundTo255thf(v.a) %s u_alphacolorref.a) discard;\n", alphaTestFuncs[alphaTestFunc]);
Expand Down Expand Up @@ -485,7 +485,7 @@ bool GenerateFragmentShader(const ShaderID &id, char *buffer, uint64_t *uniformM
const char *maskedFragColor = "ivec3(v_scaled.r & u_alphacolormask.r, v_scaled.g & u_alphacolormask.g, v_scaled.b & u_alphacolormask.b)"; const char *maskedFragColor = "ivec3(v_scaled.r & u_alphacolormask.r, v_scaled.g & u_alphacolormask.g, v_scaled.b & u_alphacolormask.b)";
const char *maskedColorRef = "ivec3(int(u_alphacolorref.r) & u_alphacolormask.r, int(u_alphacolorref.g) & u_alphacolormask.g, int(u_alphacolorref.b) & u_alphacolormask.b)"; const char *maskedColorRef = "ivec3(int(u_alphacolorref.r) & u_alphacolormask.r, int(u_alphacolorref.g) & u_alphacolormask.g, int(u_alphacolorref.b) & u_alphacolormask.b)";
WRITE(p, " if (%s %s %s) discard;\n", maskedFragColor, colorTestFuncs[colorTestFunc], maskedColorRef); WRITE(p, " if (%s %s %s) discard;\n", maskedFragColor, colorTestFuncs[colorTestFunc], maskedColorRef);
} else if (gl_extensions.gpuVendor == GPU_VENDOR_POWERVR) { } else if (gl_extensions.gpuVendor == GPU_VENDOR_IMGTEC) {
WRITE(p, " if (roundTo255thv(v.rgb) %s u_alphacolorref.rgb) discard;\n", colorTestFuncs[colorTestFunc]); WRITE(p, " if (roundTo255thv(v.rgb) %s u_alphacolorref.rgb) discard;\n", colorTestFuncs[colorTestFunc]);
} else { } else {
WRITE(p, " if (roundAndScaleTo255v(v.rgb) %s u_alphacolorref.rgb) discard;\n", colorTestFuncs[colorTestFunc]); WRITE(p, " if (roundAndScaleTo255v(v.rgb) %s u_alphacolorref.rgb) discard;\n", colorTestFuncs[colorTestFunc]);
Expand Down
2 changes: 1 addition & 1 deletion GPU/GLES/ShaderManagerGLES.cpp
Expand Up @@ -283,7 +283,7 @@ static void SetColorUniform3Alpha(int uniform, u32 color, u8 alpha) {


// This passes colors unscaled (e.g. 0 - 255 not 0 - 1.) // This passes colors unscaled (e.g. 0 - 255 not 0 - 1.)
static void SetColorUniform3Alpha255(int uniform, u32 color, u8 alpha) { static void SetColorUniform3Alpha255(int uniform, u32 color, u8 alpha) {
if (gl_extensions.gpuVendor == GPU_VENDOR_POWERVR) { if (gl_extensions.gpuVendor == GPU_VENDOR_IMGTEC) {
const float col[4] = { const float col[4] = {
(float)((color & 0xFF) >> 0) * (1.0f / 255.0f), (float)((color & 0xFF) >> 0) * (1.0f / 255.0f),
(float)((color & 0xFF00) >> 8) * (1.0f / 255.0f), (float)((color & 0xFF00) >> 8) * (1.0f / 255.0f),
Expand Down
2 changes: 1 addition & 1 deletion GPU/Vulkan/GPU_Vulkan.cpp
Expand Up @@ -177,7 +177,7 @@ GPU_Vulkan::~GPU_Vulkan() {
void GPU_Vulkan::CheckGPUFeatures() { void GPU_Vulkan::CheckGPUFeatures() {
uint32_t features = 0; uint32_t features = 0;


// Accurate depth is required on AMD so we ignore the compat flag to disable it on those. // Accurate depth is required on AMD so we ignore the compat flag to disable it on those. See #9545
if (!PSP_CoreParameter().compat.flags().DisableAccurateDepth || vulkan_->GetPhysicalDeviceProperties().vendorID == VULKAN_VENDOR_AMD) { if (!PSP_CoreParameter().compat.flags().DisableAccurateDepth || vulkan_->GetPhysicalDeviceProperties().vendorID == VULKAN_VENDOR_AMD) {
features |= GPU_SUPPORTS_ACCURATE_DEPTH; features |= GPU_SUPPORTS_ACCURATE_DEPTH;
} }
Expand Down
6 changes: 3 additions & 3 deletions ext/native/gfx_es2/gpu_features.cpp
Expand Up @@ -64,7 +64,7 @@ void ProcessGPUFeatures() {
gl_extensions.bugs |= BUG_FBO_UNUSABLE; gl_extensions.bugs |= BUG_FBO_UNUSABLE;
} }


if (gl_extensions.gpuVendor == GPU_VENDOR_POWERVR) { if (gl_extensions.gpuVendor == GPU_VENDOR_IMGTEC) {
if (!strcmp(gl_extensions.model, "PowerVR SGX 543") || if (!strcmp(gl_extensions.model, "PowerVR SGX 543") ||
!strcmp(gl_extensions.model, "PowerVR SGX 540") || !strcmp(gl_extensions.model, "PowerVR SGX 540") ||
!strcmp(gl_extensions.model, "PowerVR SGX 530") || !strcmp(gl_extensions.model, "PowerVR SGX 530") ||
Expand Down Expand Up @@ -120,9 +120,9 @@ void CheckGLExtensions() {
} else if (vendor == "ARM") { } else if (vendor == "ARM") {
gl_extensions.gpuVendor = GPU_VENDOR_ARM; gl_extensions.gpuVendor = GPU_VENDOR_ARM;
} else if (vendor == "Imagination Technologies") { } else if (vendor == "Imagination Technologies") {
gl_extensions.gpuVendor = GPU_VENDOR_POWERVR; gl_extensions.gpuVendor = GPU_VENDOR_IMGTEC;
} else if (vendor == "Qualcomm") { } else if (vendor == "Qualcomm") {
gl_extensions.gpuVendor = GPU_VENDOR_ADRENO; gl_extensions.gpuVendor = GPU_VENDOR_QUALCOMM;
} else if (vendor == "Broadcom") { } else if (vendor == "Broadcom") {
gl_extensions.gpuVendor = GPU_VENDOR_BROADCOM; gl_extensions.gpuVendor = GPU_VENDOR_BROADCOM;
// Just for reference: Galaxy Y has renderer == "VideoCore IV HW" // Just for reference: Galaxy Y has renderer == "VideoCore IV HW"
Expand Down
4 changes: 2 additions & 2 deletions ext/native/gfx_es2/gpu_features.h
Expand Up @@ -12,8 +12,8 @@ enum {
GPU_VENDOR_AMD = 2, GPU_VENDOR_AMD = 2,
GPU_VENDOR_INTEL = 3, GPU_VENDOR_INTEL = 3,
GPU_VENDOR_ARM = 4, // Mali GPU_VENDOR_ARM = 4, // Mali
GPU_VENDOR_POWERVR = 5, GPU_VENDOR_IMGTEC = 5,
GPU_VENDOR_ADRENO = 6, GPU_VENDOR_QUALCOMM = 6,
GPU_VENDOR_BROADCOM = 7, GPU_VENDOR_BROADCOM = 7,
GPU_VENDOR_UNKNOWN = 0, GPU_VENDOR_UNKNOWN = 0,
}; };
Expand Down
12 changes: 12 additions & 0 deletions ext/native/thin3d/thin3d.h
Expand Up @@ -250,6 +250,17 @@ enum InfoField {
DRIVER, DRIVER,
}; };


enum class GPUVendor {
UNKNOWN,
NVIDIA,
INTEL,
AMD,
ARM, // Mali
QUALCOMM,
IMGTEC, // PowerVR
BROADCOM, // Raspberry
};

enum class NativeObject { enum class NativeObject {
CONTEXT, CONTEXT,
CONTEXT_EX, CONTEXT_EX,
Expand Down Expand Up @@ -483,6 +494,7 @@ struct PipelineDesc {
}; };


struct DeviceCaps { struct DeviceCaps {
GPUVendor vendor;
DataFormat preferredDepthBufferFormat; DataFormat preferredDepthBufferFormat;
DataFormat preferredShadowMapFormatLow; DataFormat preferredShadowMapFormatLow;
DataFormat preferredShadowMapFormatHigh; DataFormat preferredShadowMapFormatHigh;
Expand Down
11 changes: 11 additions & 0 deletions ext/native/thin3d/thin3d_d3d11.cpp
Expand Up @@ -221,6 +221,7 @@ D3D11DrawContext::D3D11DrawContext(ID3D11Device *device, ID3D11DeviceContext *de
caps_.framebufferDepthBlitSupported = false; caps_.framebufferDepthBlitSupported = false;
caps_.framebufferDepthCopySupported = true; caps_.framebufferDepthCopySupported = true;



D3D11_FEATURE_DATA_D3D11_OPTIONS options{}; D3D11_FEATURE_DATA_D3D11_OPTIONS options{};
HRESULT result = device_->CheckFeatureSupport(D3D11_FEATURE_D3D11_OPTIONS, &options, sizeof(options)); HRESULT result = device_->CheckFeatureSupport(D3D11_FEATURE_D3D11_OPTIONS, &options, sizeof(options));
if (SUCCEEDED(result)) { if (SUCCEEDED(result)) {
Expand All @@ -241,6 +242,16 @@ D3D11DrawContext::D3D11DrawContext(ID3D11Device *device, ID3D11DeviceContext *de
DXGI_ADAPTER_DESC desc; DXGI_ADAPTER_DESC desc;
adapter->GetDesc(&desc); adapter->GetDesc(&desc);
adapterDesc_ = ConvertWStringToUTF8(desc.Description); adapterDesc_ = ConvertWStringToUTF8(desc.Description);
switch (desc.VendorId) {
case 0x10DE: caps_.vendor = GPUVendor::NVIDIA; break;
case 0x1002:
case 0x1022: caps_.vendor = GPUVendor::AMD; break;
case 0x163C:
case 0x8086:
case 0x8087: caps_.vendor = GPUVendor::INTEL; break;
default:
caps_.vendor = GPUVendor::UNKNOWN;
}
adapter->Release(); adapter->Release();
} }
dxgiDevice->Release(); dxgiDevice->Release();
Expand Down
12 changes: 12 additions & 0 deletions ext/native/thin3d/thin3d_d3d9.cpp
Expand Up @@ -588,11 +588,23 @@ D3D9Context::D3D9Context(IDirect3D9 *d3d, IDirect3D9Ex *d3dEx, int adapterId, ID
if (FAILED(d3d->GetAdapterIdentifier(adapterId, 0, &identifier_))) { if (FAILED(d3d->GetAdapterIdentifier(adapterId, 0, &identifier_))) {
ELOG("Failed to get adapter identifier: %d", adapterId); ELOG("Failed to get adapter identifier: %d", adapterId);
} }
switch (identifier_.VendorId) {
case 0x10DE: caps_.vendor = GPUVendor::NVIDIA; break;
case 0x1002:
case 0x1022: caps_.vendor = GPUVendor::AMD; break;
case 0x163C:
case 0x8086:
case 0x8087: caps_.vendor = GPUVendor::INTEL; break;
default:
caps_.vendor = GPUVendor::UNKNOWN;
}

if (!FAILED(device->GetDeviceCaps(&d3dCaps_))) { if (!FAILED(device->GetDeviceCaps(&d3dCaps_))) {
sprintf(shadeLangVersion_, "PS: %04x VS: %04x", d3dCaps_.PixelShaderVersion & 0xFFFF, d3dCaps_.VertexShaderVersion & 0xFFFF); sprintf(shadeLangVersion_, "PS: %04x VS: %04x", d3dCaps_.PixelShaderVersion & 0xFFFF, d3dCaps_.VertexShaderVersion & 0xFFFF);
} else { } else {
strcpy(shadeLangVersion_, "N/A"); strcpy(shadeLangVersion_, "N/A");
} }

caps_.multiViewport = false; caps_.multiViewport = false;
caps_.anisoSupported = true; caps_.anisoSupported = true;
caps_.depthRangeMinusOneToOne = false; caps_.depthRangeMinusOneToOne = false;
Expand Down
34 changes: 24 additions & 10 deletions ext/native/thin3d/thin3d_gl.cpp
Expand Up @@ -545,15 +545,15 @@ class OpenGLContext : public DrawContext {
} }
case VENDORSTRING: return (const char *)glGetString(GL_VENDOR); case VENDORSTRING: return (const char *)glGetString(GL_VENDOR);
case VENDOR: case VENDOR:
switch (gl_extensions.gpuVendor) { switch (caps_.vendor) {
case GPU_VENDOR_AMD: return "VENDOR_AMD"; case GPUVendor::AMD: return "VENDOR_AMD";
case GPU_VENDOR_POWERVR: return "VENDOR_POWERVR"; case GPUVendor::IMGTEC: return "VENDOR_POWERVR";
case GPU_VENDOR_NVIDIA: return "VENDOR_NVIDIA"; case GPUVendor::NVIDIA: return "VENDOR_NVIDIA";
case GPU_VENDOR_INTEL: return "VENDOR_INTEL"; case GPUVendor::INTEL: return "VENDOR_INTEL";
case GPU_VENDOR_ADRENO: return "VENDOR_ADRENO"; case GPUVendor::QUALCOMM: return "VENDOR_ADRENO";
case GPU_VENDOR_ARM: return "VENDOR_ARM"; case GPUVendor::ARM: return "VENDOR_ARM";
case GPU_VENDOR_BROADCOM: return "VENDOR_BROADCOM"; case GPUVendor::BROADCOM: return "VENDOR_BROADCOM";
case GPU_VENDOR_UNKNOWN: case GPUVendor::UNKNOWN:
default: default:
return "VENDOR_UNKNOWN"; return "VENDOR_UNKNOWN";
} }
Expand Down Expand Up @@ -609,6 +609,20 @@ OpenGLContext::OpenGLContext() {
} }
caps_.framebufferBlitSupported = gl_extensions.NV_framebuffer_blit || gl_extensions.ARB_framebuffer_object; caps_.framebufferBlitSupported = gl_extensions.NV_framebuffer_blit || gl_extensions.ARB_framebuffer_object;
caps_.framebufferDepthBlitSupported = caps_.framebufferBlitSupported; caps_.framebufferDepthBlitSupported = caps_.framebufferBlitSupported;

switch (gl_extensions.gpuVendor) {
case GPU_VENDOR_AMD: caps_.vendor = GPUVendor::AMD; break;
case GPU_VENDOR_NVIDIA: caps_.vendor = GPUVendor::NVIDIA; break;
case GPU_VENDOR_ARM: caps_.vendor = GPUVendor::ARM; break;
case GPU_VENDOR_QUALCOMM: caps_.vendor = GPUVendor::QUALCOMM; break;
case GPU_VENDOR_BROADCOM: caps_.vendor = GPUVendor::BROADCOM; break;
case GPU_VENDOR_INTEL: caps_.vendor = GPUVendor::INTEL; break;
case GPU_VENDOR_IMGTEC: caps_.vendor = GPUVendor::IMGTEC; break;
case GPU_VENDOR_UNKNOWN:
default:
caps_.vendor = GPUVendor::UNKNOWN;
break;
}
} }


OpenGLContext::~OpenGLContext() { OpenGLContext::~OpenGLContext() {
Expand Down Expand Up @@ -935,7 +949,7 @@ bool OpenGLContext::CopyFramebufferToMemorySync(Framebuffer *src, int channelBit
} }
// Apply the correct alignment. // Apply the correct alignment.
glPixelStorei(GL_PACK_ALIGNMENT, alignment); glPixelStorei(GL_PACK_ALIGNMENT, alignment);
if (!gl_extensions.IsGLES || (gl_extensions.GLES3 && gl_extensions.gpuVendor != GPU_VENDOR_NVIDIA)) { if (!gl_extensions.IsGLES || (gl_extensions.GLES3 && caps_.vendor != GPUVendor::NVIDIA)) {
// Some drivers seem to require we specify this. See #8254. // Some drivers seem to require we specify this. See #8254.
glPixelStorei(GL_PACK_ROW_LENGTH, pixelStride); glPixelStorei(GL_PACK_ROW_LENGTH, pixelStride);
} }
Expand Down
11 changes: 11 additions & 0 deletions ext/native/thin3d/thin3d_vulkan.cpp
Expand Up @@ -687,6 +687,17 @@ VKContext::VKContext(VulkanContext *vulkan)
caps_.framebufferDepthCopySupported = true; // Will pretty much always be the case. caps_.framebufferDepthCopySupported = true; // Will pretty much always be the case.
caps_.preferredDepthBufferFormat = DataFormat::D24_S8; // TODO: Ask vulkan. caps_.preferredDepthBufferFormat = DataFormat::D24_S8; // TODO: Ask vulkan.


switch (vulkan->GetPhysicalDeviceProperties().vendorID) {
case VULKAN_VENDOR_AMD: caps_.vendor = GPUVendor::AMD; break;
case VULKAN_VENDOR_ARM: caps_.vendor = GPUVendor::ARM; break;
case VULKAN_VENDOR_IMGTEC: caps_.vendor = GPUVendor::IMGTEC; break;
case VULKAN_VENDOR_NVIDIA: caps_.vendor = GPUVendor::NVIDIA; break;
case VULKAN_VENDOR_QUALCOMM: caps_.vendor = GPUVendor::QUALCOMM; break;
case VULKAN_VENDOR_INTEL: caps_.vendor = GPUVendor::INTEL; break;
default:
caps_.vendor = GPUVendor::UNKNOWN;
}

device_ = vulkan->GetDevice(); device_ = vulkan->GetDevice();


queue_ = vulkan->GetGraphicsQueue(); queue_ = vulkan->GetGraphicsQueue();
Expand Down

0 comments on commit 33e500a

Please sign in to comment.