blob: f08dc78244899179fd65160ef98b950ad3a1e8ef [file] [log] [blame]
Chia-I Wua5714e82014-08-11 15:33:42 +08001/*
Courtney Goeltzenleuchter9cc421e2015-04-08 15:36:08 -06002 * Vulkan
Chia-I Wua5714e82014-08-11 15:33:42 +08003 *
4 * Copyright (C) 2014 LunarG, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
Chia-I Wu44e42362014-09-02 08:32:09 +080023 *
24 * Authors:
25 * Chia-I Wu <olv@lunarg.com>
Chia-I Wua5714e82014-08-11 15:33:42 +080026 */
27
28#ifndef STATE_H
29#define STATE_H
30
31#include "intel.h"
32#include "obj.h"
33
Tony Barbourde4124d2015-07-03 10:33:54 -060034struct intel_dynamic_viewport {
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -060035 uint32_t viewport_count;
Chia-I Wua5714e82014-08-11 15:33:42 +080036 /* SF_CLIP_VIEWPORTs, CC_VIEWPORTs, and SCISSOR_RECTs */
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -060037 uint32_t cmd[INTEL_MAX_VIEWPORTS * (16 /* viewport */ + 2 /* cc */ + 2 /* scissor */)];
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -060038 uint32_t cmd_len;
39 uint32_t cmd_clip_pos;
40 uint32_t cmd_cc_pos;
41 uint32_t cmd_scissor_rect_pos;
Chia-I Wua5714e82014-08-11 15:33:42 +080042};
43
Cody Northrope4bc6942015-08-26 10:01:32 -060044struct intel_dynamic_line_width {
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -060045 float line_width;
Cody Northropf5bd2252015-08-17 11:10:49 -060046};
47
Cody Northrope4bc6942015-08-26 10:01:32 -060048struct intel_dynamic_depth_bias {
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -060049 float depth_bias;
50 float depth_bias_clamp;
51 float slope_scaled_depth_bias;
Chia-I Wua5714e82014-08-11 15:33:42 +080052};
53
Cody Northrope4bc6942015-08-26 10:01:32 -060054struct intel_dynamic_blend {
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -060055 float blend_const[4];
Chia-I Wua5714e82014-08-11 15:33:42 +080056};
57
Cody Northrope4bc6942015-08-26 10:01:32 -060058struct intel_dynamic_depth_bounds {
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -060059 float min_depth_bounds;
60 float max_depth_bounds;
61};
62
63struct intel_dynamic_stencil_face {
64 uint32_t stencil_compare_mask;
65 uint32_t stencil_write_mask;
66 uint32_t stencil_reference;
Cody Northrop2605cb02015-08-18 15:21:16 -060067};
68
69struct intel_dynamic_stencil {
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -060070 struct intel_dynamic_stencil_face front;
Cody Northrop2605cb02015-08-18 15:21:16 -060071 /* TODO: enable back facing stencil state */
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -060072 struct intel_dynamic_stencil_face back;
Chia-I Wua5714e82014-08-11 15:33:42 +080073};
Chia-I Wua5714e82014-08-11 15:33:42 +080074#endif /* STATE_H */