Skip to content

Commit

Permalink
feat(schema): Add missing fields to GPUContext (#1391)
Browse files Browse the repository at this point in the history
Sync `GPUContext` with https://develop.sentry.dev/sdk/event-payloads/contexts/#gpu-context

Adds `max_texture_size`, `graphics_shader_level`, `supports_draw_call_instancing`, `supports_ray_tracing`, `supports_compute_shaders`, and `supports_geometry_shaders`.
  • Loading branch information
AbhiPrasad committed Aug 9, 2022
1 parent 7077232 commit ca21850
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- Add missing fields to DeviceContext ([#1383](https://github.com/getsentry/relay/pull/1383))
- Improve performance of Redis accesses by not running `PING` everytime a connection is reused. ([#1394](https://github.com/getsentry/relay/pull/1394))
- Distinguish between various discard reasons for profiles. ([#1395](https://github.com/getsentry/relay/pull/1395))
- Add missing fields to GPUContext ([#1391](https://github.com/getsentry/relay/pull/1391))

## 22.7.0

Expand Down
22 changes: 22 additions & 0 deletions relay-general/src/protocol/contexts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,28 @@ pub struct GpuContext {
#[metastructure(pii = "maybe")]
pub npot_support: Annotated<String>,

/// Largest size of a texture that is supported by the graphics hardware.
///
/// For Example: 16384
pub max_texture_size: Annotated<u64>,

/// Approximate "shader capability" level of the graphics device.
///
/// For Example: Shader Model 2.0, OpenGL ES 3.0, Metal / OpenGL ES 3.1, 27 (unknown)
pub graphics_shader_level: Annotated<String>,

/// Whether GPU draw call instancing is supported.
pub supports_draw_call_instancing: Annotated<bool>,

/// Whether ray tracing is available on the device.
pub supports_ray_tracing: Annotated<bool>,

/// Whether compute shaders are available on the device.
pub supports_compute_shaders: Annotated<bool>,

/// Whether geometry shaders are available on the device.
pub supports_geometry_shaders: Annotated<bool>,

/// Additional arbitrary fields for forwards compatibility.
#[metastructure(additional_properties, retain = "true", pii = "maybe")]
pub other: Object<Value>,
Expand Down
50 changes: 50 additions & 0 deletions relay-general/tests/snapshots/test_fixtures__event_schema.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1690,10 +1690,28 @@ expression: event_json_schema()
"null"
]
},
"graphics_shader_level": {
"description": " Approximate \"shader capability\" level of the graphics device.\n\n For Example: Shader Model 2.0, OpenGL ES 3.0, Metal / OpenGL ES 3.1, 27 (unknown)",
"default": null,
"type": [
"string",
"null"
]
},
"id": {
"description": " The PCI identifier of the graphics device.",
"default": null
},
"max_texture_size": {
"description": " Largest size of a texture that is supported by the graphics hardware.\n\n For Example: 16384",
"default": null,
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"memory_size": {
"description": " The total GPU memory available in Megabytes.",
"default": null,
Expand Down Expand Up @@ -1728,6 +1746,38 @@ expression: event_json_schema()
"null"
]
},
"supports_compute_shaders": {
"description": " Whether compute shaders are available on the device.",
"default": null,
"type": [
"boolean",
"null"
]
},
"supports_draw_call_instancing": {
"description": " Whether GPU draw call instancing is supported.",
"default": null,
"type": [
"boolean",
"null"
]
},
"supports_geometry_shaders": {
"description": " Whether geometry shaders are available on the device.",
"default": null,
"type": [
"boolean",
"null"
]
},
"supports_ray_tracing": {
"description": " Whether ray tracing is available on the device.",
"default": null,
"type": [
"boolean",
"null"
]
},
"vendor_id": {
"description": " The PCI vendor identifier of the graphics device.",
"default": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ contexts:
api_type: Metal
multi_threaded_rendering: true
npot_support: Full
graphics_shader_level: Shader Model 5.0
max_texture_size: 16384
supports_compute_shaders: true
graphics_shader_level: Shader Model 5.0
supports_draw_call_instancing: true
supports_geometry_shaders: false
supports_ray_tracing: false
supports_compute_shaders: true
supports_geometry_shaders: false
type: gpu
os:
name: Mac OS X 10.16.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ contexts:
api_type: Metal
multi_threaded_rendering: true
npot_support: Full
graphics_shader_level: Shader Model 5.0
max_texture_size: 16384
supports_compute_shaders: true
graphics_shader_level: Shader Model 5.0
supports_draw_call_instancing: true
supports_geometry_shaders: false
supports_ray_tracing: false
supports_compute_shaders: true
supports_geometry_shaders: false
type: gpu
os:
name: Mac OS X 10.16.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ contexts:
api_type: Metal
multi_threaded_rendering: true
npot_support: Full
graphics_shader_level: Shader Model 5.0
max_texture_size: 16384
supports_compute_shaders: true
graphics_shader_level: Shader Model 5.0
supports_draw_call_instancing: true
supports_geometry_shaders: false
supports_ray_tracing: false
supports_compute_shaders: true
supports_geometry_shaders: false
type: gpu
os:
name: Mac OS X 10.16.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ contexts:
api_type: Metal
multi_threaded_rendering: true
npot_support: Full
graphics_shader_level: Shader Model 5.0
max_texture_size: 16384
supports_compute_shaders: true
graphics_shader_level: Shader Model 5.0
supports_draw_call_instancing: true
supports_geometry_shaders: false
supports_ray_tracing: false
supports_compute_shaders: true
supports_geometry_shaders: false
type: gpu
os:
name: Mac OS X 10.16.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ contexts:
api_type: Direct3D11
multi_threaded_rendering: true
npot_support: Full
graphics_shader_level: Shader Model 5.0
max_texture_size: 16384
supports_compute_shaders: true
graphics_shader_level: Shader Model 5.0
supports_draw_call_instancing: true
supports_geometry_shaders: true
supports_ray_tracing: false
supports_compute_shaders: true
supports_geometry_shaders: true
type: gpu
os:
name: Windows 10 (10.0.19042) 64bit
Expand Down

0 comments on commit ca21850

Please sign in to comment.