Code for Igalia

Some random videos and screenshots from things I do for Igalia either for work and training or for fun. Actually, it's like a selection of posts I've written in my blog, in the past and can be found under the Igalia category. I will try to update this page too every time I have new things to post about.

Computer graphics in OpenGL and Vulkan

The algorithm applied
in Iago Toral's SSAO.
An algorithm to upscale lower resolution textures (Vulkan)

My method to improve the upsampling of the SSAO render target of Iago Toral's Vulkan vkdf demo.

I used the values of a downscaled normal buffer to classify the low resolution image pixel neighborhoods in two categories: neighborhoods where all the pixels are part of the same surface and neighborhoods where there's a surface discontinuity. Then I used linear interpolation to upsample the surface neighborhoods and a depth aware algorithm to upsample the neighborhoods that contain discontinuities. I used my own downsampling method to select the most representative pixel of each neighborhood and I achieved better results compared to those from some proposed downsampling algorithms (max depth, checkerboard). An analysis of all the experiments I've done step by step and how I've found the final algorithm as well as metrics and comparisons is described in Part 6 and further analyzed in the series of blog posts below.

Depth aware upsampling experiments blog posts:
Terrain with cows.
A procedural terrain (OpenGL)

That was a demo I started when I joined Igalia. The purpose was to train myself in computer graphics. I've created a procedural terrain with a number of cows on it, where the user can set the number of polygons, the size, and of course the number of cows. I experimented with graphics concepts like environment mapping, image based lighting, morphing, surface subdivision and more and I used a Poisson distribution based trick to uniformly spread the cows on the terrain). Unfortunately, I never finished the additional Vulkan backend I wanted to implement due to lack of time.

Blog post: A terrain rendering approach.

Posts related to graphics drivers development

Posts related to contributions to graphics drivers and APIs as part of my work for Igalia's graphics team).
  • OpenGL and Vulkan interoperability on Linux related posts. These are posts related to the implementation of EXT_external_objects(_fd) extensions that allow OpenGL and Vulkan access to the same resources. As part of my work for Igalia I've contributed to this extension for iris (patches), radeonsi (some fixes to the already implemented feature), i965 (review), and I've written a Vulkan framework for piglit and tests to check several extension use cases in different drivers (intel, amd, freedreno). The posts are mostly about these use cases:
  • Improvements in the ETC/EAC formats emulation for old Intel GPUs allowing Gen7 GPUs to be conformant with modern OpenGL standards. After that:
    • OES_copy_image extension could be enabled on Gen7.
    • The GPUs became conformant with the OpenGL 4.3 standard (148 conformance tests that were failing have passed).
    • Cubemaps and mipmaps of compressed formats could be copied and displayed properly.
    • glGetCompressedTexImage2D, glGetCompressedTextureSubImage2D, glCopyImageSubData and other GetCompressed* functions have the expected behavior.
    One thing that was impossible to support was the auto mipmap generation for obvious reasons (also explained in the blog post).
    Read the blog post for more details.

  • Some posts on vkrunner (a tool to debug the Vulkan drivers by writing shader tests, written by Neil Roberts):

  • Other:
    • an OpenGL shader viewer that can instantly show the changes (hobby project)
      This was a project I started to save time to myself when I write shader tests. When I started adding tests to piglit and vkrunner, I found a bit frustrating to save the file, compile, then run the test and check the result for errors. In case of vkrunner, the process was even slower as I had to generate the SPIR-V and the result was rendered to a PPM image that had to be checked with an external viewer.

      To make the debug of pixel shaders faster, I've written a minimal pixel shader viewer that can instantly show the changes in a shader file when this file is saved.

      The viewer has only support for pixel shaders, but can read both GLSL pixel shaders and vkrunner/piglit formatted shader tests that contain a pixel shader (the parser is quite minimal though but it does the job).

      I now use this viewer when I need to write a pixel shader quickly, and as soon as everything looks fine to me I add it to piglit or vkrunner. In case of vkrunner, I might have to take into account the differences in the coordinate system sometimes but I still feel that development is faster this way.

    • an OpenGL/SPIRV example
      I had the chance to learn some things about Vulkan and GL extensions in Igalia, and contribute to some of them (e.g. VK_EXT_sample_locations). This post is from a time that I had to do some testing and small bug fixes for the ARB_gl_spirv extension that was written by my colleagues. I wrote a quick GL/SPIRV example to learn how to use the extension and to familiarize myself with the team's work on it.

Demos inspired by conferences (These were all written for fun)

Rust helloworld.
GUADEC 2019 inspired helloworld in Rust

My first program in Rust. I wrote it while attending a Rust/Gtk workshop in GUADEC 2019 where I went with Igalia (sponsor). I used OpenGL and SDL2 though for the graphics. :)

Blog post:
GUADEC 2019 took place in my city! Also: my helloworld in Rust.
XDC 2018 intro.
A short intro inspired by the XDC 2018 logo

XDC 2018 was organized and sponsored by Igalia and took place in A Coruña. This is a short animated intro inspired by the lighthouse of A Coruña that was used in the logo.

Blog post: XDC2018
Mohawk hair simulation.
Hair simulation using a mass-spring system

That was a mohawk hair simulation demo, inspired by some really cool animations at SIGGRAPH 2018 where I went with Igalia.

Blog post:
Hair simulation with a mass-spring system (punk's not dead!)

Other posts about hacks, conferences, presentations (not code)

FOSSCOM17 (el, gr).
Posts about presentations, conferences, hacks or anything else I might have posted under the Igalia category and is not about code of mine.