123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import {Fragment} from 'react';
- import ContextBlock from 'sentry/components/events/contexts/contextBlock';
- import {getUnknownData} from '../getUnknownData';
- import getOperatingSystemKnownData from './getGPUKnownData';
- import {GPUData, GPUKnownDataType} from './types';
- type Props = {
- data: GPUData;
- };
- const gpuKnownDataValues = [
- GPUKnownDataType.NAME,
- GPUKnownDataType.VERSION,
- GPUKnownDataType.VENDOR_NAME,
- GPUKnownDataType.MEMORY,
- GPUKnownDataType.NPOT_SUPPORT,
- GPUKnownDataType.MULTI_THREAD_RENDERING,
- GPUKnownDataType.API_TYPE,
- ];
- const gpuIgnoredDataValues = [];
- function GPU({data}: Props) {
- if (data.vendor_id > 0) {
- gpuKnownDataValues.unshift[GPUKnownDataType.VENDOR_ID];
- }
- if (data.id > 0) {
- gpuKnownDataValues.unshift[GPUKnownDataType.ID];
- }
- return (
- <Fragment>
- <ContextBlock data={getOperatingSystemKnownData(data, gpuKnownDataValues)} />
- <ContextBlock
- data={getUnknownData({
- allData: data,
- knownKeys: [...gpuKnownDataValues, ...gpuIgnoredDataValues],
- })}
- />
- </Fragment>
- );
- }
- export default GPU;
|