Path: blob/21.2-virgl/src/gallium/drivers/r300/r300_texture_desc.h
4570 views
/*1* Copyright 2008 Corbin Simpson <[email protected]>2* Copyright 2010 Marek Olšák <[email protected]>3*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* on the rights to use, copy, modify, merge, publish, distribute, sub8* license, and/or sell copies of the Software, and to permit persons to whom9* the Software is furnished to do so, subject to the following conditions:10*11* The above copyright notice and this permission notice (including the next12* paragraph) shall be included in all copies or substantial portions of the13* 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 AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,19* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR20* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE21* USE OR OTHER DEALINGS IN THE SOFTWARE. */2223#ifndef R300_TEXTURE_DESC_H24#define R300_TEXTURE_DESC_H2526#include "pipe/p_format.h"27#include "r300_context.h"2829struct pipe_resource;30struct r300_screen;31struct r300_texture_desc;32struct r300_resource;3334enum r300_dim {35DIM_WIDTH = 0,36DIM_HEIGHT = 137};3839unsigned r300_get_pixel_alignment(enum pipe_format format,40unsigned num_samples,41enum radeon_bo_layout microtile,42enum radeon_bo_layout macrotile,43enum r300_dim dim, boolean is_rs690);4445void r300_texture_desc_init(struct r300_screen *rscreen,46struct r300_resource *tex,47const struct pipe_resource *base);4849unsigned r300_texture_get_offset(struct r300_resource *tex,50unsigned level, unsigned layer);5152unsigned r300_stride_to_width(enum pipe_format format,53unsigned stride_in_bytes);5455#endif565758