~mmach/netext73/mesa_2004

« back to all changes in this revision

Viewing changes to src/gallium/frontends/nine/nine_defines.h

  • Committer: mmach
  • Date: 2022-09-22 20:00:35 UTC
  • Revision ID: netbit73@gmail.com-20220922200035-j2mt0pv92d002zy3
2022-09-22 21:17:58

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2011 Joakim Sindholt <opensource@zhasha.com>
 
3
 *
 
4
 * Permission is hereby granted, free of charge, to any person obtaining a
 
5
 * copy of this software and associated documentation files (the "Software"),
 
6
 * to deal in the Software without restriction, including without limitation
 
7
 * on the rights to use, copy, modify, merge, publish, distribute, sub
 
8
 * license, and/or sell copies of the Software, and to permit persons to whom
 
9
 * the Software is furnished to do so, subject to the following conditions:
 
10
 *
 
11
 * The above copyright notice and this permission notice (including the next
 
12
 * paragraph) shall be included in all copies or substantial portions of the
 
13
 * Software.
 
14
 *
 
15
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
16
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
17
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 
18
 * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
 
19
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 
20
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 
21
 * USE OR OTHER DEALINGS IN THE SOFTWARE. */
 
22
 
 
23
#ifndef _NINE_DEFINES_H_
 
24
#define _NINE_DEFINES_H_
 
25
 
 
26
#include "pipe/p_defines.h"
 
27
 
 
28
 
 
29
#define NINE_RESOURCE_FLAG_LOCKABLE (PIPE_RESOURCE_FLAG_FRONTEND_PRIV << 1)
 
30
#define NINE_RESOURCE_FLAG_DUMMY    (PIPE_RESOURCE_FLAG_FRONTEND_PRIV << 2)
 
31
 
 
32
/* vertexdeclaration9.c */
 
33
uint16_t nine_d3d9_to_nine_declusage(unsigned usage, unsigned index);
 
34
 
 
35
#define NINE_DECLUSAGE_POSITION         0
 
36
#define NINE_DECLUSAGE_BLENDWEIGHT      1
 
37
#define NINE_DECLUSAGE_BLENDINDICES     2
 
38
#define NINE_DECLUSAGE_NORMAL           3
 
39
#define NINE_DECLUSAGE_TEXCOORD         4
 
40
#define NINE_DECLUSAGE_TANGENT          5
 
41
#define NINE_DECLUSAGE_BINORMAL         6
 
42
#define NINE_DECLUSAGE_COLOR            7
 
43
#define NINE_DECLUSAGE_POSITIONT        8
 
44
 
 
45
#define NINE_DECLUSAGE_PSIZE            9
 
46
#define NINE_DECLUSAGE_TESSFACTOR       10
 
47
#define NINE_DECLUSAGE_DEPTH            11
 
48
#define NINE_DECLUSAGE_FOG              12
 
49
#define NINE_DECLUSAGE_SAMPLE           13
 
50
#define NINE_DECLUSAGE_NONE             14
 
51
#define NINE_DECLUSAGE_COUNT            (NINE_DECLUSAGE_NONE + 1)
 
52
 
 
53
#define NINE_DECLUSAGE_i(declusage, n) NINE_DECLUSAGE_##declusage + n * NINE_DECLUSAGE_COUNT
 
54
 
 
55
#define NINED3DCLEAR_DEPTHSTENCIL   (D3DCLEAR_ZBUFFER | D3DCLEAR_STENCIL)
 
56
 
 
57
#define NINE_BIND_BACKBUFFER_FLAGS    (PIPE_BIND_RENDER_TARGET |\
 
58
                                       PIPE_BIND_SAMPLER_VIEW)
 
59
 
 
60
#define NINE_BIND_PRESENTBUFFER_FLAGS (PIPE_BIND_RENDER_TARGET |\
 
61
                                       PIPE_BIND_DISPLAY_TARGET |\
 
62
                                       PIPE_BIND_SCANOUT |\
 
63
                                       PIPE_BIND_SHARED)
 
64
 
 
65
#endif /* _NINE_DEFINES_H_ */