Commit Graph

1836 Commits

Author SHA1 Message Date
Robert Bragg
d43505db22 arbfp: remove redundant unit_state re-initialization
When we are about to start arbfp codegen we call shader_state_new() to
allocate new state structures used to build up the code and that
function makes sure to zero the newly allocated structures.

Right after calling shader_state_new() we were then also explicitly
iterating though the newly allocated unit_state structures and zeroing
the .sampled and .dirty_combine_constant members as well as resetting
shader_state->next_constant_id = 0. This patch removes that redundant
re-initialization of state.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2011-09-09 14:40:48 +01:00
Robert Bragg
b6cea6bed6 arbfp: track which layers have combine constants
We weren't actually tracking which layers have been allocated param
space for combine constants; all layers just had a default constant_id
of 0 that indexes into the program.local[] params array and a dirty flag
to say when the constant needs updating. There are times though when we
say to update everything by-passing the dirty flag and because we
weren't actually tracking which layers needed constants we would always
write a constant to program.local[0] for every layer. The upshot was
that we could end up clobbering a real constant that was actually
allocated the constant_id = 0 slot.

This patch adds a new UnitState bitfield to track if the layer has a
corresponding constant that may need flushing and we only ever write the
constant with glProgramLocalParameter4fv if that's set.

https://bugzilla.gnome.org/show_bug.cgi?id=658092

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2011-09-09 14:40:48 +01:00
Bruce Cowan
5888e0c65f Updated British English translation 2011-09-09 13:14:02 +01:00
Manoj Kumar Giri
57b8f4c6ce Updated Oriya Translation 2011-09-09 11:11:42 +05:30
Robert Bragg
b5a7657076 Starts porting Cogl conformance tests from Clutter
This makes a start on porting the Cogl conformance tests that currently
still live in the Clutter repository to be standalone Cogl tests that no
longer require a ClutterStage.

The main thing is that this commit brings in is the basic testing
infrastructure we need, so now we can port more and more tests
incrementally.

Since the test suite wants a way to synchronize X requests/replies and
we can't simply call XSynchronize in the test-utils code before we know
if we are really running on X this adds a check for an environment
variable named "COGL_X11_SYNC" in cogl-xlib-renderer.c and if it's set
it forces XSynchronize (dpy, TRUE) to be called.

By default the conformance tests are run off screen. This makes the
tests run much faster and they also don't interfere with other work you
may want to do by constantly stealing focus. CoglOnscreen framebuffers
obviously don't get tested this way so it's important that the tests
also get run on screen every once in a while, especially if changes are
being made to CoglFramebuffer related code.  On screen testing can be
enabled by setting COGL_TEST_ONSCREEN=1 in your environment.
2011-09-08 15:48:07 +01:00
Matej Urbančič
40848e72dc Updated Slovenian translation 2011-09-07 21:05:26 +02:00
Matej Urbančič
181e000adb Added Slovenian translation 2011-09-07 21:01:21 +02:00
Luca Ferretti
fdfb143106 Added Italian translation 2011-09-07 00:36:01 +02:00
Chun-wei Fan
a1d869384e Fix typo in cogl/cogl-display.h
The line "#define cogl_display_get_rendrer cogl_display_get_rendrer_EXP"
should read
"#define cogl_display_get_renderer cogl_display_get_renderer_EXP"...

https://bugzilla.gnome.org/show_bug.cgi?id=658333

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-09-06 11:19:20 +01:00
Andika Triwidada
81486b1681 Added Indonesian translation 2011-09-06 14:06:52 +07:00
Arash Mousavi
a4d0d606ef Added persian translation 2011-09-06 11:32:23 +04:30
Wouter Bolsterlee
b3c133f1d2 New Dutch translation by Wouter Bolsterlee 2011-09-06 01:00:25 +02:00
Abdalrahim G. Fakhouri
6d6e291e44 Added Arabic translation 2011-09-05 21:12:57 +01:00
Emmanuele Bassi
e1c2b9335f docs: Update the Bugzilla URL in the README
https://bugzilla.gnome.org/show_bug.cgi?id=656442

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-09-05 20:59:00 +01:00
Robert Bragg
e4ef536c7a build: fix make release-message find the sha256 file
the sha256 file for the release should be found under the build/
directory not at the top of the repo.
2011-09-05 20:59:00 +01:00
Robert Bragg
ad4cfaf270 Post-release version bump to 1.7.9 2011-09-05 20:19:03 +01:00
Robert Bragg
99c25f34ef Release 1.7.8 (snapshot) 2011-09-05 19:26:20 +01:00
Robert Bragg
40281e608b Updates NEWS for the 1.7.8 release 2011-09-05 19:06:02 +01:00
Emmanuele Bassi
69b0db4cdb build: Require gobject-2.0 and gmodule-no-export-2.0
Cogl requires gobject and gmodule API, so we need to check for these and
add them to the pkg-config files as dependencies, otherwise building
Cogl with --as-needed (like modern distributions now do) will cause
build errors.

https://bugzilla.gnome.org/show_bug.cgi?id=656809

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-09-05 19:05:27 +01:00
Robert Bragg
191d915671 framebuffer: Add a getter for the framebuffer format
This adds a new function, cogl_framebuffer_get_color_format() to be able
to query the common pixel format for any color buffers attached to a
given CoglFramebuffer. For example an offscreen framebuffer created
using cogl_offscreen_new_to_texture() would have a format matching the
texture.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2011-09-05 19:02:05 +01:00
Robert Bragg
476ff37fa6 display: always ensure we have an onscreen_template
If the user doesn't explicitly pass an onscreen template then instead of
leaving display->onscreen_template as NULL we now instantiate a template
ourselves. This simplifies winsys code that might want to refer to the
template since it needn't first check for a NULL pointer.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2011-09-05 19:02:05 +01:00
Robert Bragg
21e87a9bf0 texture-2d: move #defines before gtk-doc
All our experimental Cogl symbols have a corresponding #define to add
"_EXP" to the end of the symbol name, but those defines are often
positioned right after the corresponding gtk-doc comment and before
the symbol definition which means the generated documentation ends up
refering to the define and not the real definition. This tidies up
cogl-texture-2d.h and moves all the defines to be be before the gtk-doc
comments.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2011-09-05 19:02:05 +01:00
Emmanuele Bassi
fcd6a45b98 Update the COPYING file
The FSF changed address, so we need to update the license file to match
the upstream one.

https://bugzilla.gnome.org/show_bug.cgi?id=656587

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-09-05 19:02:05 +01:00
Neil Roberts
e7f374d799 cogl-pipeline-fragend-glsl: Cache the results of texture lookups
Whenever a texture lookup is performed for a layer the result is now
stored in a variable and used repeatedly instead of generating the
code for the lookup every time it is accessed. This means for example
when using the INTERPOLATE function with a texture lookup for the
third parameter it will only generate one texture lookup instead of
two.

https://bugzilla.gnome.org/show_bug.cgi?id=656426

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-09-05 19:02:04 +01:00
Neil Roberts
769c8472dd fragend-glsl: Don't generate code for ignored layers
This patch changes it so that code for each layer is generated on
demand instead of directly in the add_layer implementation. The
pipeline only explicitly generates code for the last layer. If this
layer references the result from any other layers, these will also be
recursively generated. This means that if a layer is using 'REPLACE'
then it won't redundantly generate the code for the previous
layers.

The result for each layer is generated into a variable called layer%i
where %i is the layer index (not the unit index). Therefore to get the
result from layer n we just have to refer to the varible layern.

https://bugzilla.gnome.org/show_bug.cgi?id=656426

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-09-05 19:02:04 +01:00
Neil Roberts
503f138fb6 texture: Call _cogl_texture_prepare_for_upload in set_region impl
Instead of calling _cogl_texutre_prepare_for_upload in
cogl_texture_set_region_from_bitmap the call is now deferred to the
implementation of the virtual for set_region. This is needed if the
texture backend is using a different format for the actual GL texture
than what is reported by cogl_texture_get_format. This happens for
example with atlas textures which report the original internal format
specified when the texture was created but actually always store the
data in an RGBA texture.

Also when creating an atlas texture from a bitmap it was preparing the
bitmap to be uploaded to the original format instead of the format of
the actual texture used for the atlas. Then it was using
cogl_texture_set_region_from_bitmap to upload the 5 pieces to make the
copies of the edge pixels. This would end up converting the image to
the actual format 5 times. The atlas textures have now been changed to
prepare the bitmap for the right format.

https://bugzilla.gnome.org/show_bug.cgi?id=657840

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-09-05 19:02:04 +01:00
Robert Bragg
5ac563afdb examples: use $(COGL_PANGO_DEP_LIBS) for cogl-pango users
The crate example uses the cogl_pango API and perviously we just
explicitly said to link with the libcogl-pango.la but that doesn't seem
to be enough (not really sure why since libtool should know the required
dependencies to brining in for linking) so we now pass
$(COGL_PANGO_DEP_LIBS) when linking the crate demo.

https://bugzilla.gnome.org/show_bug.cgi?id=656441
2011-09-05 19:01:49 +01:00
Robert Bragg
9b56ce4d5b blend-strings: Make braces around blend factor optional
for a blend string like:
"RGBA=ADD(SRC_COLOR, SRC_COLOR * (DST_COLOR[A]))"
it was awkward that we were requiring developers to explicitly put
redundant brackets around the DST_COLOR[A] blend factor. The parser has
been updated so now braces are only required for factors like
"(1-SRC_COLOR[A])"

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2011-09-05 17:54:46 +01:00
Damien Lespiau
c36652a4c3 renderer: Add cogl_renderer_get_n_fragment_texture_units()
Add a method on the renderer to know how many texture image units are
accessible from fragment shaders.

https://bugzilla.gnome.org/show_bug.cgi?id=657347

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-09-05 17:54:46 +01:00
Damien Lespiau
6a2e21183c display: Add an accessor to get the renderer out of a display
https://bugzilla.gnome.org/show_bug.cgi?id=657347

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-09-05 17:54:46 +01:00
Damien Lespiau
6584c183f0 context: Add an accessor to get display associated with the context
https://bugzilla.gnome.org/show_bug.cgi?id=657347

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-09-05 17:54:46 +01:00
Damien Lespiau
4e1d08d59e pipeline: Remove unsused get_max_texture_image_units()
This function was not used in the opengl pipeline, probably because of
the more precise get_max_activable_texture_units().

Remove it then.

https://bugzilla.gnome.org/show_bug.cgi?id=657347

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-09-05 17:54:46 +01:00
Robert Bragg
11d221af1a android: don't list android/hello/res/values for dist
EXTRA_DIST should only include files so this removes the listing
of the android/hello/res/values directory.
2011-09-05 17:54:46 +01:00
Shankar Prasad
f908f94c88 Added and updated Kannada Translation 2011-09-05 13:03:57 +05:30
Fran Dieguez
b43bbb4eca Added galician translations 2011-09-04 18:33:55 +02:00
Aurimas Černius
42a2f90039 Added Lithuanian translation 2011-09-04 18:48:30 +03:00
A S Alam
3bdc8d37ee Added Punjabi Translation 2011-09-04 17:01:30 +05:30
Marek Černocký
a66af27587 Updated Czech translation 2011-09-04 11:32:43 +02:00
Chao-Hsiung Liao
16459c60e3 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2011-09-04 06:37:31 +08:00
Kristjan SCHMIDT
65e9b72d84 Add Esperanto translation 2011-09-03 23:52:13 +02:00
Flamarion Jorge
c8c2140cda Updated Brazilian Portuguese translation. 2011-09-03 10:38:13 -04:00
Kjartan Maraas
138aaadae8 Added Norwegian bokmål translation 2011-09-03 13:30:18 +02:00
Daniel Nylander
13bca5586e Updated Swedish translation 2011-09-03 12:54:35 +02:00
Marek Černocký
11390820db Czech translation 2011-09-02 22:47:49 +02:00
Jorge González
a595ad2bcd Updated Spanish translation 2011-09-02 20:20:31 +02:00
Claude Paroz
5409b51531 Added French translation 2011-09-02 13:33:19 +02:00
Neil Roberts
6228c9f53c Post-release version bump to 1.7.7 2011-08-12 17:33:07 +01:00
Neil Roberts
e2d307f18d Release 1.7.6 (snapshot) 2011-08-12 17:33:07 +01:00
Neil Roberts
334ff80b24 README: Fix the version number
The config var used to generate the version number was using the 2.0.0
version number instead of the 1.x.x version.
2011-08-12 17:33:07 +01:00
Neil Roberts
c5910ed443 Updates NEWS for the 1.7.6 release 2011-08-12 17:33:07 +01:00