1#!/bin/sh 2# Copyright 2019 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15 16echo "To be run in the vulkan-cereal repo root directory." 17echo "Note: This needs to be in an AOSP checkout to generate guest encoder files." 18 19REPO_DIR=`pwd` 20VULKAN_REGISTRY_XML_DIR=$REPO_DIR/protocols/vulkan/xml 21VULKAN_SRC_DIR=$REPO_DIR/stream-servers/vulkan 22CEREAL_OUTPUT_DIR=$VULKAN_SRC_DIR/cereal 23 24export VK_CEREAL_GUEST_ENCODER_DIR=$REPO_DIR/../goldfish-opengl/system/vulkan_enc 25export VK_CEREAL_GUEST_HAL_DIR=$REPO_DIR/../goldfish-opengl/system/vulkan 26export VK_CEREAL_HOST_DECODER_DIR=$REPO_DIR/stream-servers/vulkan 27export VK_CEREAL_HOST_PROTO_DIR=$REPO_DIR/stream-servers/vulkan/cereal/proto 28export VK_CEREAL_HOST_INCLUDE_DIR=$REPO_DIR/include 29export VK_CEREAL_BASELIB_PREFIX=base 30export VK_CEREAL_BASELIB_LINKNAME=gfxstream-base 31 32mkdir -p $CEREAL_OUTPUT_DIR 33 34python3 $VULKAN_REGISTRY_XML_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o $CEREAL_OUTPUT_DIR 35 36echo "Done generating Vulkan driver." 37 38