1c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors/* 2c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * Copyright (c) 2012-2015 Etnaviv Project 3c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * 4c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * Permission is hereby granted, free of charge, to any person obtaining a 5c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * copy of this software and associated documentation files (the "Software"), 6c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * to deal in the Software without restriction, including without limitation 7c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * the rights to use, copy, modify, merge, publish, distribute, sub license, 8c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * and/or sell copies of the Software, and to permit persons to whom the 9c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * Software is furnished to do so, subject to the following conditions: 10c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * 11c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * The above copyright notice and this permission notice (including the 12c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * next paragraph) shall be included in all copies or substantial portions 13c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * of the Software. 14c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * 15c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 18c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * DEALINGS IN THE SOFTWARE. 22c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * 23c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * Authors: 24c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * Wladimir J. van der Laan <laanwj@gmail.com> 25c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors * Christian Gmeiner <christian.gmeiner@gmail.com> 26c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors */ 27c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors 28c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors#ifndef ETNAVIV_STATE_H_ 29c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors#define ETNAVIV_STATE_H_ 30c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors 31c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors#include "etnaviv_context.h" 32c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors#include "pipe/p_context.h" 33c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors 34c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authorsstatic inline bool 35c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authorsetna_depth_enabled(struct etna_context *ctx) 36c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors{ 37c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors return ctx->zsa && ctx->zsa->depth.enabled; 38c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors} 39c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors 40c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authorsstatic inline bool 41c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authorsetna_stencil_enabled(struct etna_context *ctx) 42c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors{ 43c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors return ctx->zsa && ctx->zsa->stencil[0].enabled; 44c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors} 45c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors 46c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authorsbool 47c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authorsetna_state_update(struct etna_context *ctx); 48c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors 49c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authorsvoid 50c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authorsetna_state_init(struct pipe_context *pctx); 51c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors 52c9e8b49b885242d84ba031dacef5aa4a5ac1e5b6The etnaviv authors#endif /* ETNAVIV_STATE_H_ */ 53