Path: blob/21.2-virgl/src/gallium/drivers/etnaviv/etnaviv_etc2.h
4570 views
/*1* Copyright (c) 2019 Etnaviv Project2* Copyright (C) 2019 Zodiac Inflight Innovations3*4* Permission is hereby granted, free of charge, to any person obtaining a5* copy of this software and associated documentation files (the "Software"),6* to deal in the Software without restriction, including without limitation7* the rights to use, copy, modify, merge, publish, distribute, sub license,8* and/or sell copies of the Software, and to permit persons to whom the9* Software is furnished to do so, subject to the following conditions:10*11* The above copyright notice and this permission notice (including the12* next paragraph) shall be included in all copies or substantial portions13* of the Software.14*15* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL18* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING20* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER21* DEALINGS IN THE SOFTWARE.22*23* Authors:24* Christian Gmeiner <[email protected]>25*/2627#ifndef H_ETNA_ETC228#define H_ETNA_ETC22930#include <stdbool.h>31#include <stdint.h>3233#include "pipe/p_format.h"34#include "util/u_dynarray.h"3536struct pipe_resource;3738bool39etna_etc2_needs_patching(const struct pipe_resource *prsc);4041void42etna_etc2_calculate_blocks(uint8_t *buffer, unsigned stride,43unsigned width, unsigned height,44enum pipe_format format,45struct util_dynarray *offsets);4647void48etna_etc2_patch(uint8_t *buffer, const struct util_dynarray *offsets);4950#endif515253