Path: blob/21.2-virgl/src/gallium/drivers/iris/iris_binder.h
4565 views
/*1* Copyright © 2018 Intel Corporation2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL17* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING19* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS20* IN THE SOFTWARE.21*/2223#ifndef IRIS_BINDER_DOT_H24#define IRIS_BINDER_DOT_H2526#include <stdint.h>27#include <stdbool.h>28#include "compiler/shader_enums.h"2930struct iris_bo;31struct iris_batch;32struct iris_bufmgr;33struct iris_compiled_shader;34struct iris_context;3536struct iris_binder37{38struct iris_bo *bo;39void *map;4041/** Insert new entries at this offset (in bytes) */42uint32_t insert_point;4344/**45* Last assigned offset for each shader stage's binding table.46* Zero is considered invalid and means there's no binding table.47*/48uint32_t bt_offset[MESA_SHADER_STAGES];49};5051void iris_init_binder(struct iris_context *ice);52void iris_destroy_binder(struct iris_binder *binder);53uint32_t iris_binder_reserve(struct iris_context *ice, unsigned size);54void iris_binder_reserve_3d(struct iris_context *ice);55void iris_binder_reserve_compute(struct iris_context *ice);5657#endif585960