summaryrefslogtreecommitdiffstats
path: root/src/gallium/docs/source/screen.rst
blob: 8cb7c70cd337dfdbc2400cecb481629e8abce4e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Screen
======

A screen is an object representing the context-independent part of a device.

Useful Flags
------------

PIPE_TEXTURE_USAGE
^^^^^^^^^^^^^^^^^^

These flags determine the possible roles a texture may be used for during its
lifetime. Texture usage flags are cumulative and may be combined to create a
texture that can be used as multiple things.

* ``RENDER_TARGET``: A colorbuffer or pixelbuffer.
* ``DISPLAY_TARGET``: A sharable buffer that can be given to another process.
* ``PRIMARY``: A frontbuffer or scanout buffer.
* ``DEPTH_STENCIL``: A depthbuffer, stencilbuffer, or Z buffer. Gallium does
  not explicitly provide for stencil-only buffers, so any stencilbuffer
  validated here is implicitly also a depthbuffer.
* ``SAMPLER``: A texture that may be sampled from in a fragment or vertex
  shader.
* ``DYNAMIC``: XXX undefined

Methods
-------

XXX moar; got bored

get_name
^^^^^^^^

Returns an identifying name for the screen.

get_vendor
^^^^^^^^^^

Returns the screen vendor.

get_param
^^^^^^^^^

Get an integer/boolean screen parameter.

get_paramf
^^^^^^^^^^

Get a floating-point screen parameter.

is_format_supported
^^^^^^^^^^^^^^^^^^^

See if a format can be used in a specific manner.

**usage** is a bitmask of ``PIPE_TEXTURE_USAGE`` flags.

Returns TRUE if all usages can be satisfied.

texture_create
^^^^^^^^^^^^^^

Given a template of texture setup, create a BO-backed texture.