blob: 169b76b93c30ae41b2347679a849c4ebaefbd925 [file]
// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module gpu.mojom;
import "services/viz/public/mojom/compositing/shared_image_format.mojom";
// See gpu/command_buffer/common/capabilities.h.
struct Capabilities {
int32 max_texture_size;
bool egl_image_external;
// TODO(crbug.com/477164718): Add mojo support for this bool.
// bool egl_image_external_essl3;
bool texture_format_bgra8888;
bool texture_format_etc1_npot;
bool disable_mac_swangle_rgbx;
bool sync_query;
bool texture_rg;
bool texture_norm16;
bool texture_half_float_linear;
bool image_ar30;
bool image_ab30;
bool render_buffer_format_bgra8888;
bool msaa_is_slow;
bool avoid_stencil_buffers;
bool supports_rgb_to_yuv_conversion;
bool supports_yuv_readback;
bool mesa_framebuffer_flip_y;
bool context_supports_distance_field_text;
bool using_vulkan_context;
bool use_deferred_graphite_submit;
map<uint32, array<uint64>> drm_formats_and_modifiers;
uint64 drm_device_id;
};
struct ShaderPrecision {
int32 min_range;
int32 max_range;
int32 precision;
};
struct PerStagePrecisions {
ShaderPrecision low_int;
ShaderPrecision medium_int;
ShaderPrecision high_int;
ShaderPrecision low_float;
ShaderPrecision medium_float;
ShaderPrecision high_float;
};
// See gpu/command_buffer/common/capabilities.h.
struct GLCapabilities {
PerStagePrecisions vertex_shader_precisions;
PerStagePrecisions fragment_shader_precisions;
int32 major_version;
int32 minor_version;
int32 max_combined_texture_image_units;
int32 max_cube_map_texture_size;
int32 max_fragment_uniform_vectors;
int32 max_renderbuffer_size;
int32 max_texture_image_units;
int32 max_varying_vectors;
int32 max_vertex_attribs;
int32 max_vertex_texture_image_units;
int32 max_vertex_uniform_vectors;
int32 max_viewport_width;
int32 max_viewport_height;
int32 num_compressed_texture_formats;
int32 num_shader_binary_formats;
int32 max_3d_texture_size;
int32 max_array_texture_layers;
int32 max_color_attachments;
int64 max_combined_fragment_uniform_components;
int32 max_combined_uniform_blocks;
int64 max_combined_vertex_uniform_components;
int32 max_draw_buffers;
int64 max_element_index;
int32 max_elements_indices;
int32 max_elements_vertices;
int32 max_fragment_input_components;
int32 max_fragment_uniform_blocks;
int32 max_fragment_uniform_components;
int32 max_program_texel_offset;
int32 max_samples;
int64 max_server_wait_timeout;
float max_texture_lod_bias;
int32 max_transform_feedback_interleaved_components;
int32 max_transform_feedback_separate_attribs;
int32 max_transform_feedback_separate_components;
int64 max_uniform_block_size;
int32 max_uniform_buffer_bindings;
int32 max_varying_components;
int32 max_vertex_output_components;
int32 max_vertex_uniform_blocks;
int32 max_vertex_uniform_components;
int32 min_program_texel_offset;
int32 num_program_binary_formats;
int32 uniform_buffer_offset_alignment;
bool occlusion_query_boolean;
bool timer_queries;
int32 max_texture_size;
bool sync_query;
};