Ian Romanick [Wed, 15 Aug 2012 16:57:50 +0000 (09:57 -0700)]
mesa/es: Add support for GL_APPLE_texture_max_level
This is desktop OpenGL functionality that has always existed.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Ian Romanick [Fri, 27 Jul 2012 01:15:40 +0000 (18:15 -0700)]
mesa/es: Validate glGetTexParameter pnames in Mesa code rather than the ES wrapper
This also adds a missing extension (and API) check around
GL_TEXTURE_CROP_RECT_OES.
v2: Add proper core-profile and GLES3 filtering. GL_TEXTURE_MAX_LEVEL
is (incorrectly) accepted in ES contexts. A future patch will add
GL_APPLE_texture_max_level, and meta really needs this.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Ian Romanick [Fri, 27 Jul 2012 01:04:50 +0000 (18:04 -0700)]
mesa/es: Validate glTexParameter pnames in Mesa code rather than the ES wrapper
This also adds a missing extension (and API) check around
GL_TEXTURE_CROP_RECT_OES.
v2: Add proper core-profile, GLES1, and GLES3 filtering. GL_TEXTURE_MAX_LEVEL
is (incorrectly) accepted in ES contexts. A future patch will add
GL_APPLE_texture_max_level, and meta really needs this.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Ian Romanick [Fri, 27 Jul 2012 00:49:55 +0000 (17:49 -0700)]
mesa/es: Remove redundant glBindTexture target validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Ian Romanick [Fri, 27 Jul 2012 00:41:43 +0000 (17:41 -0700)]
mesa: Filter glBindTexture targets based on supported features.
Fixed the piglit test arb_texture_buffer_object-negative-unsupported.
NOTE: This is a candidate for stable release branches.
v2: Add proper core-profile and GLES3 filtering.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Ian Romanick [Thu, 26 Jul 2012 17:39:45 +0000 (10:39 -0700)]
mesa/es: Validate tex image targets in Mesa code rather than the ES wrapper
This should take care of all the TexImage, TexSubImage, CopyTexImage,
CompressedTexImage3DOES, and CopyTexSubImage type paths.
v2: Add proper core-profile and GLES3 filtering.
v3: Squash the CompressedTexImage3DOES patch per review comment from
Ken.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Ian Romanick [Wed, 25 Jul 2012 23:13:33 +0000 (16:13 -0700)]
mesa/es: Validate EGLImageTargetTexture2DOES target in Mesa code rather than the ES wrapper
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Ian Romanick [Wed, 25 Jul 2012 23:03:44 +0000 (16:03 -0700)]
mesa/es: Validate glTexParameter targets in Mesa code rather than the ES wrapper
Ditto for glGetTexParameter targets.
v2: Add proper core-profile and GLES3 filtering.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Ian Romanick [Mon, 3 Oct 2011 20:03:47 +0000 (13:03 -0700)]
mesa/es: Validate GL_TEXTURE_WRAP param in Mesa code rather than the ES wrapper
v2: Add proper core-profile filtering.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Ian Romanick [Mon, 3 Oct 2011 19:46:23 +0000 (12:46 -0700)]
mesa: Refactor validate_texture_wrap_mode to use a switch-statement
This makes the next couple changes a little easier.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Ian Romanick [Thu, 23 Aug 2012 01:53:42 +0000 (18:53 -0700)]
meta: Don't modify GL_GENERATE_MIPMAP state when it doesn't exist
This is a bit of a hack. _mesa_meta_GenerateMipmap shouldn't even be
used in contexts where GL_GENERATE_MIPMAP doesn't exist (i.e., core
profile and ES2) because it uses fixed-function, and fixed-function
doesn't exist there either!
A GLSL-based _mesa_meta_GenerateMipmap should be available soon. When
that is available, this patch will be irrelevant and should be reverted.
v2: Change (ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) to
(ctx->API == API_OPENGL || ctx->API == API_OPENGLES) based on review
comment from Brian Paul.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tapani Pälli [Fri, 17 Aug 2012 07:32:53 +0000 (10:32 +0300)]
build/glsl: fix android build v2
Commit
77a3efc6b907943903190b385fdf107c4acfcdca broke android build that
sets its own value for GLSL_SRCDIR before including Makefile.sources.
Patch moves overriding the value after include, this works as GLSL_SRCDIR
variable gets expanded only later.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Matt Turner [Tue, 21 Aug 2012 21:36:44 +0000 (14:36 -0700)]
automake: convert es1api
Matt Turner [Tue, 21 Aug 2012 21:52:59 +0000 (14:52 -0700)]
automake: convert es2api
Vadim Girlin [Thu, 12 Apr 2012 00:30:57 +0000 (04:30 +0400)]
st/dri: pass config options to the state tracker
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Thu, 12 Apr 2012 00:30:03 +0000 (04:30 +0400)]
st/mesa: accept and handle configuration options from st/dri
Currently there is a single option - force_glsl_extensions_warn.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Thu, 12 Apr 2012 00:28:52 +0000 (04:28 +0400)]
st/dri: add force_glsl_extensions_warn option to dri options
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Thu, 12 Apr 2012 00:28:24 +0000 (04:28 +0400)]
st/dri: use driver name for driconf section lookup
The name is taken from the driver_descriptor, so it will be the same as
expected by driconf utility.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Wed, 22 Aug 2012 16:20:04 +0000 (20:20 +0400)]
swrast: add DRM_DRIVER_DESCRIPTOR to store driver name
Paulo Alcantara [Fri, 17 Aug 2012 17:08:10 +0000 (14:08 -0300)]
egl_dri2: Fix segmentation fault
The segmentation fault occurs when DRI2 is not loaded up and
dri2_setup_screen() function deferences dri2_dpy->dri2 (since it's NULL
at this point).
This patch fixes the segmentation fault by checking if dri2 pointer is
not NULL before deferencing it.
Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
Tom Stellard [Tue, 21 Aug 2012 17:48:14 +0000 (17:48 +0000)]
radeon/llvm: Use the MCCodeEmitter for R600
Tom Stellard [Fri, 17 Aug 2012 19:42:11 +0000 (19:42 +0000)]
radeon/llvm: Use the MCCodeEmitter for SI
Tom Stellard [Fri, 17 Aug 2012 20:51:31 +0000 (20:51 +0000)]
radeon/llvm: Set 64BitPtr feature bit for SI
Tom Stellard [Fri, 17 Aug 2012 19:07:37 +0000 (19:07 +0000)]
radeon/llvm: Lower RETFLAG DAG Node to S_ENDPGM on SI
Tom Stellard [Fri, 17 Aug 2012 15:52:15 +0000 (15:52 +0000)]
radeon/llvm: Add AsmPrinter
Tom Stellard [Thu, 16 Aug 2012 17:39:23 +0000 (17:39 +0000)]
radeon/llvm: Mark JUMP as a pseudo instruction
Tom Stellard [Thu, 23 Aug 2012 13:55:22 +0000 (13:55 +0000)]
radeon/llvm: Remove the last uses of MachineOperand flags
Tom Stellard [Wed, 22 Aug 2012 15:04:58 +0000 (15:04 +0000)]
radeon/llvm: Add flag operand to some instructions
This new operand replaces the MachineOperand flags in LLVM, which
will be deprecated soon. Eventually all instructions should have a flag
operand, but for now this operand has only been added to instructions
that need it.
Tom Stellard [Tue, 21 Aug 2012 19:30:26 +0000 (19:30 +0000)]
radeon/llvm: Encapsulate setting of MachineOperand flags
MachineOperand flags will be removed soon, so it is convienent to
have only one function that modifies them.
Matt Turner [Fri, 17 Aug 2012 23:24:32 +0000 (16:24 -0700)]
build: Link DRI drivers with dricore in case of no direct rendering
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Fri, 17 Aug 2012 22:51:59 +0000 (15:51 -0700)]
build: Only build libmesagallium.la if building Gallium
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Fri, 17 Aug 2012 22:43:27 +0000 (15:43 -0700)]
build: Clean glx Makefile.am
mapi/glapi is already built when make is run in src/glx.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Fri, 17 Aug 2012 21:54:25 +0000 (14:54 -0700)]
build: Put mapi/shared-glapi in CORE_DIRS
SRC_DIRS was overwritten (visible in the second hunk).
Also don't require mapi/shared-glapi to be built for GLES.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Fri, 17 Aug 2012 21:22:47 +0000 (14:22 -0700)]
build: Only allow shared-glapi with DRI
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Fri, 17 Aug 2012 21:05:56 +0000 (14:05 -0700)]
build: Set sensible DRI/X11/OSMesa defaults
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Fri, 17 Aug 2012 18:25:14 +0000 (11:25 -0700)]
build: Print whether shared-glapi is enabled
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Fri, 17 Aug 2012 18:16:45 +0000 (11:16 -0700)]
build/x11: Force usage of C++ linker
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Fri, 17 Aug 2012 18:12:48 +0000 (11:12 -0700)]
build/x11: Don't link against shared-glapi
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Fri, 17 Aug 2012 16:31:16 +0000 (09:31 -0700)]
build: Remove deprecated --with-driver= flag
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Christian König [Wed, 22 Aug 2012 10:35:02 +0000 (12:35 +0200)]
radeonsi: rework vertex format handling
Preventing piglit's draw-vertices test from hanging the GPU.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Christian König [Tue, 21 Aug 2012 12:41:29 +0000 (14:41 +0200)]
radeonsi: fix SPI_PS_INPUT_ENA handling
We need to enable at least one interpolation mode,
otherwise the GPU will hang.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Vadim Girlin [Tue, 21 Aug 2012 11:39:25 +0000 (15:39 +0400)]
r600g: fix lockups with dual_src_blend v2
Disable blending when dual_src_blend is enabled and number of color exports
in the current fragment shader is less than 2.
Fixes lockups with ext_framebuffer_multisample-
alpha-to-coverage-dual-src-blend piglit test.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Jakob Bornecrantz [Tue, 14 Aug 2012 13:19:22 +0000 (15:19 +0200)]
st/dri: Add shared usage on buffers created
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Jakob Bornecrantz [Tue, 14 Aug 2012 13:15:56 +0000 (15:15 +0200)]
gbm: Add shared usage on images created
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Anuj Phogat [Tue, 21 Aug 2012 18:03:48 +0000 (11:03 -0700)]
mesa: Fix generic compressed texture formats' handling in glTexImage/glCopyTexImage
The generic texture formats should be accepted by the <internalformat>
parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, and
CopyTexImage2D functions. When the application specifies a generic
format, the driver is free to pick an uncompressed format.
This patch reverts the changes due to following commit:
commit
a36581ccc06693231011c3fe136207e73191b1ce
mesa: do more teximage error checking for generic compressed formats
This patch fixes compressed texture format failures in intel oglconform
pxconv-gettex test case:
https://bugs.freedesktop.org/show_bug.cgi?id=47220
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tom Stellard [Tue, 21 Aug 2012 14:53:50 +0000 (14:53 +0000)]
radeon/llvm: ExpandSpecialInstrs - Add support for cube instructions
Tom Stellard [Tue, 21 Aug 2012 14:33:04 +0000 (14:33 +0000)]
radeon/llvm: ExpandSpecialInstrs - Add support for vector instructions
Tom Stellard [Mon, 20 Aug 2012 21:09:00 +0000 (21:09 +0000)]
radeon/llvm: Add R600ExpandSpecialInstrs pass
This pass expends reduction instructions into a MachineInstrBundle that
contains 4 instruction, one for each instruction slot.
Tom Stellard [Mon, 20 Aug 2012 21:08:03 +0000 (21:08 +0000)]
radeon/llvm: Add helper function for getting sub reg indices
Michel Dänzer [Tue, 21 Aug 2012 11:48:18 +0000 (13:48 +0200)]
radeonsi: Handle NULL sampler views getting passed in by the state tracker.
Don't dereference NULL pointers, and if all views are NULL, don't generate an
invalid PM4 packet which locks up the GPU.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Ian Romanick [Thu, 26 Jul 2012 17:38:15 +0000 (10:38 -0700)]
APIspec: Remove cruft about AMD_compressed_???_texture
Mesa doesn't support these extensions, and it seems unlikely that it
ever will
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Fri, 27 Jul 2012 14:23:14 +0000 (07:23 -0700)]
mesa/es: Remove redundant glFramebufferTexture3D textarget validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Fri, 27 Jul 2012 14:18:48 +0000 (07:18 -0700)]
mesa/es: Remove redundant glGetShaderiv pname validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Fri, 27 Jul 2012 14:06:58 +0000 (07:06 -0700)]
mesa/es: Remove redundant glCompressedTexImage border validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Wed, 25 Jul 2012 22:24:38 +0000 (15:24 -0700)]
mesa/es: Remove redundant glPointSizePointer type validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Wed, 25 Jul 2012 23:15:25 +0000 (16:15 -0700)]
mesa/es: Remove redundant glGetBufferPointer pname validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Wed, 25 Jul 2012 22:20:32 +0000 (15:20 -0700)]
mesa/es: Remove redundant glGetVertexAttribPointer pname validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Wed, 25 Jul 2012 14:26:33 +0000 (07:26 -0700)]
mesa/es: Remove redundant element type validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Wed, 25 Jul 2012 03:18:17 +0000 (20:18 -0700)]
mesa/es: Remove redundant glGetShaderPrecisionFormat shader type validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:50:50 +0000 (16:50 -0700)]
mesa/es: Remove redundant depth func validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:50:22 +0000 (16:50 -0700)]
mesa/es: Remove redundant stencil op fail/zfail/zpass validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:47:43 +0000 (16:47 -0700)]
mesa/es: Remove redundant shade model mode validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:45:43 +0000 (16:45 -0700)]
mesa/es: Remove redundant light pname and light validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:43:43 +0000 (16:43 -0700)]
mesa/es: Remove redundant hint mode validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:21:41 +0000 (16:21 -0700)]
mesa/es: Remove redundant separate stencil face validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:20:08 +0000 (16:20 -0700)]
mesa/es: Remove redundant stencil function validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:19:04 +0000 (16:19 -0700)]
mesa/es: Remove redundant logic op operand validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:17:16 +0000 (16:17 -0700)]
mesa/es: Remove redundant alpha function validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:15:22 +0000 (16:15 -0700)]
mesa/es: Remove redundant separate stencil mask face validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:13:14 +0000 (16:13 -0700)]
mesa/es: Remove redundant front-face mode validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:09:55 +0000 (16:09 -0700)]
mesa/es: Remove redundant face culling mode validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:08:35 +0000 (16:08 -0700)]
mesa/es: Remove redundant blend equation mode validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 20 Sep 2011 23:07:04 +0000 (16:07 -0700)]
mesa/es: Remove redundant texture target validation
Mesa doesn't check the parameter passed to glMultiTexCoord*. It does,
however, mask the texture value to prevent out-of-bounds writes. This
patch will promote this non-conformant behavior to OpenGL ES 1. I don't
think anyone will care, and the gets some silly code out of a hot path.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Mon, 3 Oct 2011 20:09:51 +0000 (13:09 -0700)]
mesa/es: Rearrange placement of GL_TEXTURE_MAX_ANISOTROPY_EXT in APIspec
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Mon, 3 Oct 2011 20:05:47 +0000 (13:05 -0700)]
mesa/es: Remove redundant min/mag filter validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Mathias Fröhlich [Sat, 18 Aug 2012 09:43:51 +0000 (11:43 +0200)]
radeon-llvm: Start multithreaded before using llvm.
This is required to make some of llvm's api calls
thread save. In particular the PassRegistry, which is
implicitly accessed while compiling shader programs.
The PassRegistry uses a mutex that is only active if
the llvm_is_multithreaded() returns true.
Calling llvm_start_multithreading() makes this happen
and by calling this function we try to make sure that
we can savely compile shaders in paralell.
Since there is also a call llvm_stop_multithreading()
in the llvm api, we cannot guarantee that this does
not get switched off while we are relying on this being
set, but for the easier use cases this fixes a race with
the radeon llvm compiler we have as of today.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
archibald [Mon, 20 Aug 2012 14:44:39 +0000 (14:44 +0000)]
r600g: Move common compute/3D register init to its own function
Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
Christoph Bumiller [Sat, 18 Aug 2012 15:34:44 +0000 (17:34 +0200)]
nv50/ir/tgsi: handle DP2 in tgsi Instruction srcMask
Solved by Tiziano Bacocco on IRC.
Christoph Bumiller [Sat, 18 Aug 2012 15:30:50 +0000 (17:30 +0200)]
nv50/ir/emit: don't forget saturation bit on f32 add immediate
Solved by Maxim Levitsky on IRC.
Tilman Sauerbeck [Sat, 18 Aug 2012 09:51:22 +0000 (11:51 +0200)]
mesa: use #if over #ifdef in the FEATURE_ES1 check to fix a build failure.
mfeatures.h will define FEATURE_ES1 to 0 if it's not defined yet.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53664
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Fri, 17 Aug 2012 14:16:23 +0000 (08:16 -0600)]
st/mesa: fix sampler view counting
In the past, when we called pipe::set_sampler_views(n) the drivers set
samplers [n..MAX] to NULL. We no longer do that. The state tracker
code was already trying to set unused sampler views to NULL to cover
that case, but the logic was broken and unnoticed until now. This patch
fixes it.
Strictly speaking, this patch shouldn't be necessary. Drivers should simply
ignore unused samplers and sampler views. But some drivers like llvmpipe (and
others?) count those things and they figure into state validation. That could
be fixed in the future.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53617
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Brian Paul [Fri, 17 Aug 2012 21:20:07 +0000 (15:20 -0600)]
util: update and fix u_upload_mgr.h comments
Brian Paul [Fri, 17 Aug 2012 20:33:31 +0000 (14:33 -0600)]
st/mesa: use Elements() instead of hard-coded number
And add a comment about the velems_util_draw[] array.
Brian Paul [Fri, 17 Aug 2012 16:52:16 +0000 (10:52 -0600)]
mesa: remove unused params, add const qualifiers
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Brian Paul [Fri, 17 Aug 2012 16:50:39 +0000 (10:50 -0600)]
mesa: querying GL_TEXTURE_COMPRESSED_IMAGE_SIZE for a buffer obj is illegal
GL_INVALID_OPERATION is to be raised when querying a non-compressed
image/buffer. Since a buffer object can't have a compressed format this
query always generates an error.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Fri, 27 Jul 2012 21:38:37 +0000 (14:38 -0700)]
mesa/es: Don't generate ES1 type conversion wrappers
These are gradually going to get whittled away and eventually folded into the
source files with the native type functions.
v2: Add (speculative) SConscript changes. These may be broken.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Eric Anholt [Tue, 14 Aug 2012 01:08:56 +0000 (18:08 -0700)]
i965: Fix bug in the old FS backend's projtex() calculation.
In the old backend, we looked at any FS attribute's proj_attrib_mask bits, not
just texcoords. Now that we have _mesa_vert_result_to_frag_attrib(), we can
fill in the other FS inputs with correct proj_attrib_mask info.
NOTE: This is a candidate for stable branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46644
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Mon, 11 Jun 2012 02:33:01 +0000 (19:33 -0700)]
mesa: Support GL_TEXTURE_BUFFER in GetTexLevelParameter[if]v in GL 3.1+.
The OpenGL 3.1 specification explicitly allows this. Oddly, the
ARB_texture_buffer_object spec's issues section claims this isn't
allowed, but proceeds to explain that the extension simply doesn't edit
the underlying spec to allow it, and thus it didn't appear in the list
of legal texture targets.
Thus, this patch legalizes it only in 3.1+ contexts, but still returns
INVALID_ENUM in earlier contexts that expose ARB_texture_buffer_object.
Unfortunately, the behavior of the call is horrendously undefined.
Fixes oglconform's tbo/negative.textureParams test.
v2: Require desktop OpenGL.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Mon, 11 Jun 2012 08:27:38 +0000 (01:27 -0700)]
mesa: Split out part of glGetTexLevelParameter into a helper function.
Move the _mesa_GetTexLevelParameter[iv] functions below the helper
function so the prototype is available.
This will be useful in the next commit.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Mon, 11 Jun 2012 02:11:55 +0000 (19:11 -0700)]
mesa: Add GL_TEXTURE_CUBE_MAP to _mesa_max_texture_levels(). [v2]
For cube maps, _mesa_generate_mipmap() calls this with
GL_TEXTURE_CUBE_MAP (the gl_texture_object's Target) rather than one
of the faces. This caused _mesa_max_texture_levels() to return 0, which
resulted in maxLevels == -1 and the next line's assertion to fail.
This function is called from seven places:
- fbobject.c: framebuffer_texture()
- mipmap.c: _mesa_generate_mipmap()
- texgetimage.c:
- getteximage_error_check()
- getcompressedteximage_error_check()
- texparam.c: _mesa_GetTexLevelParameteriv()
- texstorage.c: tex_storage_error_check()
All of these (or their callers) now explicitly check for invalid targets
already, so this shouldn't cause invalid targets to slip through.
(Technically _mesa_generate_mipmap() doesn't check for invalid targets,
but the API-facing _mesa_GenerateMipmapEXT() function does.)
+2 oglconforms (float-texture/mipmap.automatic and mipmap.manual)
In addition to fixing the mipmap bug, it should also cause glTexStorage
to accept GL_TEXTURE_CUBE_MAP, which is explicitly allowed by the spec.
v2: Drop alterations to callers; this is now in a patch series that adds
explicit checking to API functions.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Mon, 11 Jun 2012 01:41:58 +0000 (18:41 -0700)]
mesa: Add explicit target checking to GetTexLevelParameter[if]v().
Previously, it relied on _mesa_max_texture_levels() for texture target
error checking. This was somewhat dodgy, as _mesa_max_texture_levels()
is called in seven diferent places, not all of which necessarily accept
the same list of targets.
I copied the list of legal targets from _mesa_max_texture_levels(), so
this patch should not introduce any change in behavior. Future patches
will cause the two to diverge.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Mon, 11 Jun 2012 02:06:23 +0000 (19:06 -0700)]
mesa: Add explicit target checking to Get[Compressed]TexImage().
Previously, they relied on _mesa_max_texture_levels() for texture target
error checking. This was somewhat dodgy, as _mesa_max_texture_levels()
is called in seven diferent places, not all of which necessarily accept
the same list of targets.
I copied the list of legal targets from _mesa_max_texture_levels() but
removed the proxy targets, as both functions explicitly rejected those
targets. This changes the order in which we check errors, which could
change whether we return INVALID_VALUE or INVALID_ENUM. However, it
shouldn't change the list of accepted targets.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Fri, 17 Aug 2012 14:58:15 +0000 (08:58 -0600)]
llvmpipe: remove polygon stipple assertion
It's possible for us to have an unused sampler bound when the fragment
shader itself doesn't use any samplers. So the assertion isn't valid.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53616
Brian Paul [Thu, 16 Aug 2012 21:27:39 +0000 (15:27 -0600)]
svga: minor code reformatting
To be consistent with other functions.
Matt Turner [Tue, 14 Aug 2012 19:36:01 +0000 (12:36 -0700)]
build: Remove -shared from OSMesa's LDFLAGS
Would break the static build.
Matt Turner [Tue, 14 Aug 2012 19:33:32 +0000 (12:33 -0700)]
build: Remove EXTRA_LIB_PATH
You can add extra library paths to LDFLAGS directly.
Matt Turner [Tue, 14 Aug 2012 19:24:31 +0000 (12:24 -0700)]
build: Require X11 pkg-config files
Marek Olšák [Thu, 16 Aug 2012 18:36:40 +0000 (20:36 +0200)]
r600g: disable tiling for 422 formats again
Marek Olšák [Tue, 7 Aug 2012 01:30:43 +0000 (03:30 +0200)]
r600g: fix blits of subsampled formats
Marek Olšák [Thu, 16 Aug 2012 17:05:22 +0000 (19:05 +0200)]
r600g: fix copying between NPOT mipmapped compressed textures
We aligned the dimensions to the blocksize, then divided by it
(in r600_blit.c), then minified, which was wrong.
The minification must be done first, not last.
This fixes piglit/fbo-generatemipmap-formats with S3TC and maybe
a bunch of other tests too. Tested on RV730.