Commit graph

46258 commits

Author SHA1 Message Date
José Fonseca
221a04fa8e st/egl: Fix GDI build. 2011-09-08 09:32:10 +01:00
José Fonseca
1cf808c86e Define INLINE macro in terms of inline. 2011-09-08 09:17:42 +01:00
Benjamin Franzke
7645c49e07 st/egl: add premultiplied alpha support to wayland
Return true for NATIVE_PARAM_PREMULTIPLIED_ALPHA when all formats with
alpha support premultiplied alpha.

(Based on Chia-I Wu's patch)

[olv: remove the use of param_premultiplied_alpha from the original
      patch]
2011-09-08 16:05:41 +08:00
Benjamin Franzke
1191d20363 st/egl: correctly return configs under wayland
Handle "format" events and return configs for the supported formats.

(Based on Chia-I Wu's patch)

[olv: update and explain why PIPE_FORMAT_B8G8R8A8_UNORM should not be
      enabled without HAS_ARGB32]
2011-09-08 16:05:40 +08:00
Chia-I Wu
ee0e6ae2bb Revert "st/egl: correctly return configs under wayland"
This reverts commit 95b445699d.
2011-09-08 16:05:32 +08:00
Chia-I Wu
93a96abe16 Revert "st/egl: add premultiplied alpha support to wayland"
This reverts commit 23aa978a9d.
2011-09-08 16:05:22 +08:00
Chia-I Wu
23aa978a9d st/egl: add premultiplied alpha support to wayland
Return true for NATIVE_PARAM_PREMULTIPLIED_ALPHA when all formats with
alpha support premultiplied alpha.  Currently, it means when argb32 and
argb32_pre are both supported.
2011-09-08 11:16:12 +08:00
Chia-I Wu
95b445699d st/egl: correctly return configs under wayland
When wl_drm is avaiable and enabled, handle "format" events and return
configs for the supported formats.  Otherwise, assume all formats of
wl_shm are supported.
2011-09-08 11:16:12 +08:00
Chia-I Wu
41f5d2e8ac st/egl: overload NATIVE_PARAM_PREMULTIPLIED_ALPHA
EGL does not export this capability of a display server.  But wayland
makes use of EGL_VG_ALPHA_FORMAT to achieve it.

So, when the native display returns true for the parameter, st/egl will
set EGL_VG_ALPHA_FORMAT_PRE_BIT for all EGLConfig's with non-zero
EGL_ALPHA_SIZE.  EGL_VG_ALPHA_FORMAT attribute of a surface will affect
how the surface is presented.

Because st/vega does not support EGL_VG_ALPHA_FORMAT_PRE_BIT,
EGL_OPENVG_BIT will be cleared.
2011-09-08 11:16:12 +08:00
Chia-I Wu
f4c37d6ab2 st/egl: add NATIVE_PARAM_PREMULTIPLIED_ALPHA
Return TRUE if the display supports premultiplied alpha.
2011-09-08 11:16:12 +08:00
Chia-I Wu
08e1076fd2 st/egl: add native_present_control
Replace the parameters of native_surface::present by a struct,
native_present_control.  Using a struct allows us to add more control
options without having to update each backend every time.
2011-09-08 11:16:11 +08:00
Brian Paul
c0470bf77a glsl: s/int/unsigned/ to silence warning 2011-09-07 16:47:14 -06:00
Stéphane Marchesin
c1cac8feec st/mesa: Remove unused renderbuffer fields and functions.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-07 15:42:39 -07:00
Kenneth Graunke
4bc5bfb641 i965/fs: Implement ir_u2f opcode.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-07 10:43:09 -07:00
Kenneth Graunke
8de3314f63 i965: Fix disassembly for intdiv/intmod math functions.
The opcodes and strings were reversed.  Quotient means division, and
modulus means remainder.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-07 10:43:09 -07:00
Chia-I Wu
6b52e82768 st/egl: track changes to drop wl_visual in wayland
Follow a subset of changes in 7b1d94e5d1.
There are known issues, but it works to a certain degree.  Non-working
demos also fail gracefully.  More importantly, it fixes the build.
2011-09-08 01:26:24 +08:00
Chia-I Wu
b89bca6d8b st/egl: track server side wayland changes
Follow changes in c661ecce10.
2011-09-08 01:23:51 +08:00
Chia-I Wu
287278352e st/egl: use new wl_callback mechanism in wayland
Follow the changes in 6602bda23b.
2011-09-08 01:23:48 +08:00
Kenneth Graunke
477b74e85b i965: Use proper texture alignment units for cubemaps on Gen5+.
In particular, S3TC compressed textures need align_h == 4.

Fixes skybox errors in Quake 4 and FEAR.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34628
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-07 07:49:55 -07:00
Kenneth Graunke
8ceb235c9c glsl/ir_reader: Make sure constants have the right number of components.
The list of numbers in (constant type (<numbers>)) needs to contain
exactly type->components() numbers (16 for a mat4, 3 for a vec3, etc.)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-07 07:49:32 -07:00
Kenneth Graunke
6afce988a9 glsl/builtins: Fix invalid float constant in noise4 built-in.
Throwing away the extra numbers ought to match the existing behavior.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-07 07:48:56 -07:00
Kenneth Graunke
f6481be298 glsl/builtins: Fix invalid vecN constants in hyperbolic functions.
Each of these vecN constants only provided one component, which is
illegal.  The printed IR is meant to contain exactly as many components
as are necessary; the IR reader does not splat single values.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-07 07:46:57 -07:00
Dave Airlie
99c1a58b30 varray.c: fix logic around BGRA with ARB_vertex_type_2_10_10_10_rev.
I introduced a regression in here, I've just split the logic ot now, so
its easier to read/understand.

Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=40664

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-07 10:20:47 +01:00
Vinson Lee
6edef25a4b mesa/vbo: s/inline/INLINE/
MSVC does not support inline keyword.
2011-09-06 21:43:51 -07:00
Eric Anholt
9bd8d90646 i965/vs: Fix point size handling on gen4.
Fixes glsl-vs-point-size.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:02:00 -07:00
Eric Anholt
9367960ea6 i965/vs: Use write commits on scratch writes in pre-gen6.
This is required to ensure ordering between reads and writes within a
thread.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:57 -07:00
Eric Anholt
838bfe0c46 i965/vs: Fix setup of scratch space pointer on pre-gen6.
We were failing to relocate, so on the first draw run our scratch
would tend to get written to 0x0.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:54 -07:00
Eric Anholt
ddf8e602a7 i965/vs: Fix message setup for array read/writes on pre-gen6.
We were passing an MRF as the source argument, instead of using the
implied move and putting the MRF number in the proper place in the
instruction encoding.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:51 -07:00
Eric Anholt
88612e2c1b i965/vs: Fix constant-indexed array read/write addresses on pre-gen6.
The second vertex was getting a garbage index.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:48 -07:00
Eric Anholt
bba910373f i965/vs: Add support for vector comparison ops resulting in bool cond codes.
Fixes a giant pile of VS tests on gen4.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:43 -07:00
Eric Anholt
9f84288607 i965/vs: Make pre-gen6 math operate in vector mode instead of scalar.
On the old backend, we used scalar mode because Mesa IR math is
result.xyzw = math(op0.xxxx), which matched up well.  However, in GLSL
IR we do things like result.xy = math(op0.xy), so we want vector mode.
For the common case of result.x = math(op0.x), performance will be the
same (no cost for un-executed channels), though result.xyzw =
math(op0.xxxx) would be worse.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:23 -07:00
Eric Anholt
87be0ac96c i965/vs: Fix copy-and-paste disaster in pre-gen6 POW support.
Fixes vs-pow-float-float and friends.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:20 -07:00
Eric Anholt
2ffc5ac1da i965/vs: Fix gen4 comparisons used for predication.
When we tried to retype a brw_null_reg() in CMP(), the retyping didn't
take effect because HW_REG just ignores the type field.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:17 -07:00
Eric Anholt
8adcad213e i965/vs: Fix GPU hangs in shaders with large virtual GRFs pre-gen6.
If you get your total GRF count wrong, you write over some other
shader's g0, and the GPU fails shortly thereafter.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:00:57 -07:00
Brian Paul
23eec54bb0 i965: add casts to silence int/enum conversion warnings 2011-09-06 16:50:27 -06:00
Stéphane Marchesin
02f1b50987 state_trackers/dri/sw: Implement texture_from_pixmap.
Signed-off-by: Stuart Abercrombie <sabercrombie@chromium.org>
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
2011-09-06 15:03:01 -07:00
Stéphane Marchesin
569bde1fa7 Duplicate state_tracker/dri/sw/dri_drawable.c
We need this for the upcoming fix for sw texture_from_pixmap.

Signed-off-by: Stuart Abercrombie <sabercrombie@chromium.org>
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
2011-09-06 15:03:00 -07:00
nobled
55e763c86d Enable GLX_EXT_texture_from_pixmap in software.
Signed-off-by: nobled <nobled@dreamwidth.org>
Signed-off-by: Stuart Abercrombie <sabercrombie@chromium.org>
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
2011-09-06 15:03:00 -07:00
Brian Paul
a4adc88a2d st/mesa: remove unneeded #include 2011-09-06 15:44:44 -06:00
Brian Paul
1a65d098ce mesa: whitespace fixes, just to be consistent 2011-09-06 15:31:26 -06:00
Brian Paul
51e7b05875 mesa: put _mesa_ prefix on vert_result_to_frag_attrib() 2011-09-06 15:29:24 -06:00
Brian Paul
a794ad3709 mesa: fix vert_result_to_frag_attrib() parameter type 2011-09-06 15:24:14 -06:00
Brian Paul
37afceeee9 mesa: s/inline/INLINE/ to fix MSVC build 2011-09-06 15:20:33 -06:00
Adam Jackson
7826067bd1 Drop some Glide remnants
Apparently the x11 driver had a hack for glide passthrough.  Who knew?

Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-09-06 16:23:50 -04:00
Adam Jackson
7f379df401 Remove an AmiWin leftover
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-09-06 16:23:50 -04:00
Adam Jackson
c7cc61fea9 Remove dead glfbdev.h
This belonged to the now-dead swrast-on-fbdev driver.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-09-06 16:23:50 -04:00
Adam Jackson
f6f2f59818 Drop documentation references for deleted backends
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-09-06 16:23:50 -04:00
José Fonseca
f4dd099171 rtasm,translate: Disable on Mingw-w64.
Causes crash and stack corruption.

Needs more investigation. Disable for now.
2011-09-06 20:40:44 +01:00
Ian Romanick
5812b24845 docs: skeleton file for 7.12 release notes
Current just the items that have been removed from Mesa are mentioned
in the release notes.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:09:36 -07:00
Ian Romanick
3602fbb201 mesa: Remove support for unpacking from client memory to color-index pixels
Mesa hasn't supported color-index rendering for a long time.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:09:32 -07:00