Git Product home page Git Product logo

gf-layers's Introduction

gf-layers

A set of Vulkan layers that can be built for Linux, Mac, Windows, and Android.

This repository is a work-in-progress.

  • WIP: VkLayer_GF_frame_counter: counts the frames per second.

This is not an officially supported Google product.

Build

# Clone the repo.
git clone [email protected]:google/gf-layers.git
# Or:
git clone https://github.com/google/gf-layers.git

# Navigate to the root of the repo.
cd gf-layers

# Update and init submodules.
git submodule update --init

# Build using a recent version of CMake. Ensure `ninja` is on your PATH.
mkdir build
cd build

cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug
cmake --build . --config Debug
cmake -DCMAKE_INSTALL_PREFIX=./install -P cmake_install.cmake --config Debug

# Layers are installed to `build/install/lib/`.
# You can skip the final "install" step and find the layers in `build/`.

Test the layers

For example:

export VK_LAYER_PATH=/path/to/gf-layers/build
export VK_INSTANCE_LAYERS=VkLayer_GF_frame_counter
./vulkan_app

Run checks and fixes

Only Bash on Linux is supported for now. Ensure ninja is on your PATH and python3 is at least Python 3.6.

# Launch the developer shell.
# 6GB+ (Clang 10, Android NDK, etc.) will be downloaded to `./temp/`.
# Scripts and Clang 10 will be added to your PATH.
./dev_shell.sh.template

# Run all checks.
check_all.sh

# (Re-)Generate files.
generate_files.py

# Fix C++ formatting via clang-format-10.
fix_format.sh

Coding conventions

CLion

Use CLion to open the top-level CMakeLists.txt file.

Install and configure plugins:

  • File Watchers (may already be installed).
    • The watcher task should already be under version control.

Add dictionary.dic as a custom dictionary (search for "Spelling" in Actions). Do not add words via the "Quick Fixes" feature, as the word will only be added to your personal dictionary. Instead, manually add the word to dictionary.dic.

gf-layers's People

Contributors

afd avatar ilkkasaa avatar paulthomson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gf-layers's Issues

Add brief document explaining coding style

The project follows Google style, with some exceptions when declaring variables/functions that mirror the names of Vulkan variables/functions.

It would be good to have a brief document explaining this with some examples (examples from the frame counter layer would be good, for instance).

Assert in vkGetInstanceProcAddr

I was running the Amber scoop layer with Validation layers on. Everything is working fine when I define VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation:VkLayer_GF_amber_scoop but reversing the layer order causes assert here:

DEBUG_ASSERT(next_get_instance_proc_address ==

I think we should simply set our dispatch table's vkGetInstanceProcAddr pointer to be next_get_instance_proc_address instead of calling next_get_instance_proc_address(*pInstance, "vkGetInstanceProcAddr") .

At least looking at the loader's dispatch table helper it's implemented that way: https://github.com/KhronosGroup/Vulkan-Loader/blob/e2b55419a3708880026f84eef10a0ad601d2776b/loader/generated/vk_dispatch_table_helper.h#L917

Same applies also to vkGetDeviceProcAddr.

AmberScoop: intercept vkDestoryCommandPool or create our own command pool

vkDestoryCommandPool frees all command buffers, so we may need to intercept that as well at some point. On the other hand, if we are only tracking command buffers (and command pools) to make use of an existing command pool, then maybe it would be easier to just create our own command pool(s).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.