1// Copyright (C) 2024 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package gfxstream.guest.gles2; 18 19// Gfxstream's custom format for `glGetProgramBinary()` and `glProgramBinary()`. 20message ProgramBinaryInfo { 21 // Info about the program that can not be queried or recreated from the host 22 // program and must be saved in order to recreate the original guest program 23 // state. 24 message GuestProgramInfo { 25 // The uniform indices that were originally `samplerExternalOes`. These 26 // need to be explicitly saved because they are rewritten to `sampler2D` 27 // before being sent to the host. 28 repeated uint64 external_sampler_uniform_indices = 1; 29 } 30 31 GuestProgramInfo guest_program_info = 1; 32 33 message HostProgramInfo { 34 // The GLenum returned in glGetProgramBinary()'s `binaryFormat` parameter. 35 uint64 binary_format = 1; 36 37 // The bytes returned in glGetProgramBinary()'s `binary` parameter. 38 bytes binary = 2; 39 } 40 41 HostProgramInfo host_program_info = 2; 42} 43