Commit graph

1705 commits

Author SHA1 Message Date
Michal Krol
2c046034dc Remove TGSI_OPCODE_SHR, map existing usage to TGSI_OPCODE_ISHR.
This is to differentiate it from its unsigned version, TGSI_OPCODE_USHR.
2010-01-05 09:26:48 +01:00
Michal Krol
c59eda0993 gallium: Add more integer TGSI opcodes. 2010-01-05 09:26:43 +01:00
Brian Paul
c0b4fb06b8 gallium: pipe_context::render_condition() and mode flags
For conditional rendering predicated on results of an occlusion query.

If this driver function is NULL, conditional rendering is not supported by
the driver.
2009-12-31 14:45:15 -07:00
Michal Krol
f7d1689cfa gallium: Move instance_divisor field from vertex_buffer to vertex_element. 2009-12-29 19:18:54 +01:00
Zack Rusin
fb0a9aa5e0 gallium: remove TGSI_SEMANTIC_VERTICES
it's a leftover from an early version of geometry shading support.
geometry shaders now encode the primitive size in the PROPERTY token
and don't need special input with their size.
2009-12-25 05:52:20 -05:00
Zack Rusin
519a6d308d gallium: geometry shader can be always enabled and we don't need a cap for that
using the draw module allows us to enable geometry shading even on hardware
that doesn't support it.
2009-12-25 05:52:20 -05:00
Zack Rusin
a00da63e66 util: put vertices_per_primitive function in its proper location 2009-12-25 05:52:19 -05:00
Zack Rusin
f658fa5e8f gallium: add an inline that returns number of vertices per primitive 2009-12-25 05:52:18 -05:00
Zack Rusin
89d8577fb3 gallium: add geometry shader support to gallium 2009-12-25 05:52:16 -05:00
Roland Scheidegger
beb712ee9a gallium: API cleanup, remove pointless pipe_constant_buffer 2009-12-23 20:42:55 +01:00
Michal Krol
d0b55120be gallium: Add interfaces needed for instanced drawing. 2009-12-23 19:37:18 +01:00
Roland Scheidegger
35e8283c69 Merge branch 'gallium-edgeflags'
Conflicts:
	src/mesa/state_tracker/st_draw.c
2009-12-22 20:54:26 +01:00
Keith Whitwell
09e785ee04 gallium: remove return value from draw calls 2009-12-21 22:14:35 +00:00
Michal Krol
b1ed72ebe2 Move the remaining format pf_get_* functions to u_format.h.
Previously they depended on format blocks, but after removing those
they started depending on format encoding.
2009-12-17 23:41:57 +01:00
Michal Krol
16c6dce013 Merge branch 'master' into pipe-format-simplify
Conflicts:
	src/gallium/auxiliary/draw/draw_pipe_aaline.c
	src/gallium/auxiliary/draw/draw_pipe_pstipple.c
	src/gallium/auxiliary/util/u_blit.c
	src/gallium/auxiliary/util/u_gen_mipmap.c
	src/gallium/auxiliary/util/u_surface.c
	src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
	src/gallium/drivers/cell/ppu/cell_texture.c
	src/gallium/drivers/llvmpipe/lp_texture.c
	src/gallium/drivers/r300/r300_emit.c
	src/gallium/drivers/r300/r300_texture.c
	src/gallium/drivers/softpipe/sp_texture.c
	src/gallium/drivers/softpipe/sp_tile_cache.c
	src/gallium/drivers/svga/svga_state_vs.c
	src/gallium/include/pipe/p_format.h
	src/gallium/state_trackers/dri/dri_drawable.c
	src/gallium/state_trackers/egl/egl_surface.c
	src/gallium/state_trackers/python/p_device.i
	src/gallium/state_trackers/python/st_softpipe_winsys.c
	src/gallium/state_trackers/vega/api_filters.c
	src/gallium/state_trackers/vega/image.c
	src/gallium/state_trackers/vega/mask.c
	src/gallium/state_trackers/vega/paint.c
	src/gallium/state_trackers/vega/renderer.c
	src/gallium/state_trackers/vega/vg_tracker.c
	src/gallium/state_trackers/xorg/xorg_crtc.c
	src/gallium/state_trackers/xorg/xorg_dri2.c
	src/gallium/state_trackers/xorg/xorg_exa.c
	src/gallium/state_trackers/xorg/xorg_renderer.c
	src/gallium/state_trackers/xorg/xorg_xv.c
	src/gallium/state_trackers/xorg/xvmc/surface.c
	src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
	src/gallium/winsys/drm/radeon/core/radeon_buffer.c
	src/gallium/winsys/egl_xlib/sw_winsys.c
	src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
	src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c
	src/gallium/winsys/gdi/gdi_softpipe_winsys.c
	src/gallium/winsys/xlib/xlib_cell.c
	src/gallium/winsys/xlib/xlib_llvmpipe.c
	src/gallium/winsys/xlib/xlib_softpipe.c
	src/mesa/state_tracker/st_cb_fbo.c
	src/mesa/state_tracker/st_cb_texture.c
	src/mesa/state_tracker/st_texture.c
2009-12-17 22:37:15 +01:00
Marek Olšák
e1d0f47808 pipe: add PIPE_MAX_TEXTURE_TYPES 2009-12-15 18:00:39 +00:00
Zack Rusin
3ff688ea29 tgsi: add properties and system value register
adds support for properties to all parts of the tgsi framework, plus
introduces a new register which will be used for system generated
values.
2009-12-14 16:35:09 -05:00
Brian Paul
4430a05a3a gallium: added comment for pipe_reference() return value 2009-12-11 16:50:25 -07:00
Michal Krol
f610656608 gallium: WIP: Introduce sampler views. 2010-02-19 19:00:26 +01:00
Keith Whitwell
a08e348a84 gallium: first steps to treat edgeflags as regular vertex element
The idea here is to eliminate the set_edgeflags() call in pipe_context
by treating edgeflags as a regular vertex element.

Edgeflags provoke special treatment in hardware, which means we need to
label them in some way, in this case we'll be passing them through the
vertex shader and labelling the vertex shader output with a new TGSI
semantic (TGSI_SEMANTIC_EDGEFLAG).
2009-12-09 19:03:10 +01:00
Roland Scheidegger
fd7a9ec7f9 gallium: use boolean instead of bool in p_refcnt.h
all code in gallium should use boolean not bool
2009-12-08 19:58:28 +01:00
Roland Scheidegger
4ebc54795d Merge branch 'gallium-strict-aliasing' 2009-12-08 19:26:20 +01:00
Michal Krol
714e1880d9 gallium: Make pipe_format a sequential enum. 2009-12-08 15:35:54 +01:00
Michal Krol
6fd8b9b550 Remove remaining pipe format utility functions.
Depricate pf_type(), pf_size_*(), pf_layout() and pf_exp2().

Map depricated PIPE_FORMAT_TYPE to new UTIL_FORMAT_ values:

UNKNOWN = TYPE_VOID
UNORM   = TYPE_UNSIGNED + LAYOUT_ARITH
SNORM   = TYPE_SIGNED + LAYOUT_ARITH
FIXED   = TYPE_FIXED
FLOAT   = TYPE_FLOAT
USCALED = TYPE_UNSIGNED + LAYOUT_ARRAY
SSCALED = TYPE_SIGNED + LAYOUT_ARRAY
SRGB    = TYPE_COLORSPACE_SRGB
2009-12-08 15:30:10 +01:00
Younes Manton
447dddb93d Merge branch 'master' into pipe-video
Conflicts:

	src/gallium/auxiliary/vl/vl_compositor.c
	src/gallium/auxiliary/vl/vl_compositor.h
	src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
	src/gallium/auxiliary/vl/vl_shader_build.c
2009-12-06 16:44:11 -05:00
José Fonseca
818fd6b101 gallium: Disable force_align_arg_pointer attribute on x86_64.
Apparently not only unnecessary but also causes gcc to complain.
2009-12-04 21:27:03 +00:00
Roland Scheidegger
9c6a9363ef Merge branch 'gallium-noblocks'
Conflicts:
	src/gallium/state_trackers/xorg/xorg_exa.c
2009-12-04 00:35:14 +01:00
Roland Scheidegger
35a15f0263 gallium: fix reference counting functions to be strict-aliasing compliant
Historically, parts of mesa code are not strict-aliasing safe, hence
-fno-strict-aliasing is needed to compile (this got forgotten for scons
builds for gallium, which indeed not only caused compiler warnings but also
unexplicable crashes in non-debug builds). However, we should try to eliminate
code not complying with strict-aliasing code at least for gallium.
Hence change pipe_reference functions to make them strict-aliasing compliant.
This adds a bit more complexity (especially for derived classes) but is the
right thing to do, and it does in fact fix a segfault.
2009-12-03 23:15:38 +01:00
Michal Krol
72befaaae5 Remove pf_swizzle_* internal macros. 2009-12-03 12:25:49 +01:00
Michal Krol
018f33a328 gallium: Remove pf_mixed_*(). 2009-12-03 12:05:21 +01:00
Michal Krol
9861ad46ab gallium: Remove pf_rev(). 2009-12-03 12:03:57 +01:00
Michal Krol
f5bd93fae2 Move pf_get_component_bits() to u_format auxiliary module. 2009-12-03 11:58:36 +01:00
Michal Krol
cceeab39ea Move pf_get_bits/size() to u_format auxiliary module. 2009-12-03 11:17:37 +01:00
Michal Krol
6df42d8023 Move pf_get_block() to u_format auxiliary module. 2009-12-03 10:52:47 +01:00
Michal Krol
0bed834be4 Move pf_is_depth_and_stencil() to u_format auxiliary module. 2009-12-03 10:20:49 +01:00
Michal Krol
d28740c298 Move pf_is_depth_stencil() to u_format auxiliary module. 2009-12-03 10:12:47 +01:00
Michal Krol
3400b668e3 Move pf_is_compressed() to u_format auxiliary module. 2009-12-03 09:56:03 +01:00
Michal Krol
3ffe25c917 gallium: Remove unused format functions. 2009-12-03 09:48:18 +01:00
Brian Paul
f6d5e58427 gallium/util: added PIPE_CC_GCC_VERSION symbol 2009-12-02 09:22:42 -07:00
Keith Whitwell
87eec80c11 Merge commit 'origin/tgsi-simplify-ext'
Conflicts:
	src/gallium/drivers/r300/r300_vs.c
2009-12-01 14:31:14 +00:00
Michal Krol
15d1b406af gallium: Introduce separate vertex texture/sampler state.
Previously, gallium shared sampler and texture state between vertex
and fragment shader stages. This change generalises this concept by
providing separate entrypoints for vertex and fragment sampler state
setting.

A new capability bit is added to query the driver for the number
of samplers that can be utilised by a vertex and fragment shader
at the same time.
2009-12-01 09:51:56 +01:00
Roland Scheidegger
ac400ffce6 gallium: interface cleanups, remove nblocksx/y from pipe_texture and more
This patch removes nblocksx, nblocksy arrays from pipe_texture (can be
recalculated if needed). Furthermore, pipe_format_block struct is gone
completely (again, contains just derived state).
nblocksx, nblocksy, block are also removed from pipe_transfer, together with
the format enum (can be obtained from the texture associated with the transfer).
2009-11-30 20:29:18 +01:00
Roland Scheidegger
c95cbd45c6 Merge branch 'width0'
Conflicts:
	src/gallium/drivers/r300/r300_texture.c
	src/gallium/state_trackers/xorg/xorg_exa.c
	src/mesa/state_tracker/st_cb_texture.c
2009-11-27 17:15:47 +01:00
Michal Krol
5455e88f1c gallium: Remove tgsi_version token.
Not really needed, never served its purpose.
2009-11-27 09:19:01 +01:00
Keith Whitwell
763426a025 tgsi: reduce repetition of structure name in its members
Rename Semantic.SemanticName to Semantic.Name.  Similar for
SemanticIndex, and the members of the tgsi_version struct.
2009-11-24 14:53:29 +00:00
Keith Whitwell
ba1ca28cc6 gallium: simplify tgsi tokens further
Drop anonymous 'Extended' fields, have every optional token named
explicitly in its parent.  Eg. there is now an Instruction.Label flag,
etc.

Drop destination modifiers and other functionality which cannot be
generated by tgsi_ureg.c, which is now the primary way of creating
shaders.

Pull source modifiers into the source register token, drop the second
negate flag.  The source register token is now full - if we need to
expand it, probably best to move all of the modifiers to a new token
and have a single flag for it.
2009-11-24 13:41:03 +00:00
Michal Krol
57221c5438 gallium: Refactor the instruction predicate TGSI token.
Rename it to tgsi_instruction_predicate -- it's no longer an extended
token. Its presence is indicated by a new flag in tgsi_instruction that
indicates whether an instruction is predicated.

Also, change predicate index representation to match the other
tokens that specify register indices.
2009-11-24 09:05:26 +01:00
Keith Whitwell
683e35f726 gallium: don't use arrays for texture width,height,depth 2009-11-19 14:39:34 -08:00
José Fonseca
244591ae7b gallium: Add UNSYNCHRONIZED cpu access flag. Document others. 2009-11-06 12:06:44 +00:00
Younes Manton
dcccbfd14e g3dvl: Wrap macroblock block buffer in a pipe user buffer. 2009-11-02 22:03:09 -05:00