summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Add built-in constants for ARB_shader_image_load_store.Francisco Jerez2014-02-123-0/+37
| | | | | | v2: Add them on GLSL version 4.20 too. Reviewed-by: Paul Berry <[email protected]>
* glcpp: Add built-in define for ARB_shader_image_load_store.Francisco Jerez2014-02-121-0/+3
| | | | Reviewed-by: Paul Berry <[email protected]>
* glsl: Add built-in types defined by ARB_shader_image_load_store.Francisco Jerez2014-02-122-0/+104
| | | | Reviewed-by: Paul Berry <[email protected]>
* glsl/ast: Generalize some sampler variable restrictions to all opaque types.Francisco Jerez2014-02-122-31/+36
| | | | | | | | | | | | No opaque types may be statically initialized in the shader, all opaque variables must be declared uniform or be part of an "in" function parameter declaration, no opaque types may be used as the return type of a function. v2: Add explicit check for opaque types in interface blocks. Check for opaque types in ir_dereference::is_lvalue(). Reviewed-by: Paul Berry <[email protected]>
* glsl/ast: Forbid declaration of image variables in structures and uniform ↵Francisco Jerez2014-02-121-0/+10
| | | | | | | | | | | | | | | | | blocks. Aggregating images inside uniform blocks is explicitly disallowed by the standard, aggregating them inside structures is not (as of GL 4.4), but there is a similar problem as with atomic counters: image uniform declarations require either a "writeonly" memory qualifier or an explicit format qualifier, which are explicitly forbidden in structure member declarations. In the resolution of Khronos bug #10903 the same wording applied to atomic counters was decided to mean that they're not allowed inside structures -- Rejecting image member declarations within structures seems the most reasonable option for now. Reviewed-by: Paul Berry <[email protected]>
* glsl/ast: Make sure that image argument qualifiers match the function prototype.Francisco Jerez2014-02-121-1/+6
| | | | Reviewed-by: Paul Berry <[email protected]>
* glsl/ast: Verify that function calls don't discard image format qualifiers.Francisco Jerez2014-02-121-0/+58
| | | | Reviewed-by: Paul Berry <[email protected]>
* glsl/ast: Validate and apply memory qualifiers to image variables.Francisco Jerez2014-02-121-0/+51
| | | | Reviewed-by: Paul Berry <[email protected]>
* glsl/parser: Handle image built-in types.Francisco Jerez2014-02-121-0/+33
| | | | Reviewed-by: Paul Berry <[email protected]>
* glsl/parser: Handle image memory qualifiers.Francisco Jerez2014-02-121-0/+83
| | | | | | v2: Make the "map" array static const. Reviewed-by: Paul Berry <[email protected]>
* glsl/parser: Handle the early_fragment_tests input layout qualifier.Francisco Jerez2014-02-123-1/+20
| | | | | | v2: Only allow the early_fragment_tests qualifier in fragment shaders. Reviewed-by: Paul Berry <[email protected]>
* glsl/lexer: Add new tokens for ARB_shader_image_load_store.Francisco Jerez2014-02-122-39/+56
| | | | Reviewed-by: Paul Berry <[email protected]>
* glsl/ast: Keep track of type qualifiers defined by ARB_shader_image_load_store.Francisco Jerez2014-02-123-3/+38
| | | | | | | | v2: Add comment next to the read_only and write_only qualifier flags. Change temporary copies of the type qualifier mask to use uint64_t too. Reviewed-by: Paul Berry <[email protected]>
* glsl: Add gl_uniform_storage fields to keep track of image uniform indices.Francisco Jerez2014-02-121-18/+23
| | | | | | v2: Promote anonymous struct into named struct. Reviewed-by: Paul Berry <[email protected]>
* glsl: Add image memory and layout qualifiers to ir_variable.Francisco Jerez2014-02-122-0/+19
| | | | | | v2: Add comment next to the read_only and write_only qualifier flags. Reviewed-by: Paul Berry <[email protected]>
* glsl: Add helper methods to glsl_type for dealing with images.Francisco Jerez2014-02-124-7/+35
| | | | | | | | | | | | Add predicates to query if a GLSL type is or contains an image. Rename sampler_coordinate_components() to coordinate_components(). v2: Use assert instead of unreachable. v3: No need to use a separate code-path for images in coordinate_components() after merging image and sampler fields in the glsl_type structure. Reviewed-by: Paul Berry <[email protected]>
* glsl: Add image type to the GLSL IR.Francisco Jerez2014-02-1212-52/+76
| | | | | | | | | v2: Reuse the glsl_sampler_dim enum for images. Reuse the glsl_type::sampler_* fields instead of creating new ones specific to image types. Reuse the same constructor as for samplers adding a new 'base_type' argument. Reviewed-by: Paul Berry <[email protected]>
* glsl: Add ARB_shader_image_load_store extension enables.Francisco Jerez2014-02-122-0/+3
| | | | Reviewed-by: Paul Berry <[email protected]>
* mesa: Preserve the NewArrays state when copying a VAOFredrik Höglund2014-02-121-0/+1
| | | | | | | Cc: "10.1" "10.0" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72895 Reviewed-by: Brian Paul <[email protected]>
* nouveau: create only 1 shared screen between vdpau and openglMaarten Lankhorst2014-02-128-4/+100
| | | | | | | | This fixes bug 73200 "vdpau-GL interop fails due to different screen objects" in the same way radeon does. Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium makefiles: use a linker script for building dri driversMaarten Lankhorst2014-02-126-2/+18
| | | | | | | | | | Only export __driDriverExtensions by default, and radeon_drm_winsys_create on radeons. Remove -Bsymbolic which should no longer be needed. As a side effect, it ought to fix a manifestation of bug 73200 on radeon. Signed-off-by: Maarten Lankhorst<[email protected]> Reviewed-by: Christian König <[email protected]>
* glsl: Do not vectorize vector array dereferences.Matt Turner2014-02-111-0/+14
| | | | | | | | | | Array dereferences must have scalar indices, so we cannot vectorize them. Cc: "10.1" <[email protected]> Reported-by: Andrew Guertin <[email protected]> Tested-by: Andrew Guertin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* meta: Enable cubemap array texture support to decompress_texture_imageIan Romanick2014-02-111-7/+8
| | | | | | | | Fixed piglit test getteximage-targets S3TC CUBE_ARRAY on systems that don't have libtxc_dxtn installed. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Add cubemap array support to generic blit shader codeIan Romanick2014-02-111-0/+12
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Get the correct info logIan Romanick2014-02-111-1/+1
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Expand texture coordinate from vec3 to vec4Ian Romanick2014-02-111-8/+8
| | | | | | | | This will be necessary to support cubemap array textures because they use all four components. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Use GLSL to decompress 2D-array texturesIan Romanick2014-02-111-5/+30
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72582 Reviewed-by: Eric Anholt <[email protected]>
* meta: Use common GLSL code for blitsIan Romanick2014-02-111-95/+13
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Improve GLSL version checkIan Romanick2014-02-111-1/+6
| | | | | | | We want to use the GLSL 1.30-ish path for OpenGL ES 3.0. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Add rectangle textures to the shader-per-sampler-type tableIan Romanick2014-02-111-0/+8
| | | | | | | | | | Rectangle textures were not necessary for mipmap generation (because they cannot have mipmaps), but all of the future users of this common code will need to support rectangle textures. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Refactor shader generation code out of mipmap generation pathIan Romanick2014-02-111-78/+91
| | | | | | | | | This is quite like code we want for blits. Pull it out so that it can be shared by other paths. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Refactor the table of glsl_sampler structuresIan Romanick2014-02-111-56/+72
| | | | | | | | | | | | | This will allow the same table of shader-per-sampler-type to be used for paths in meta other than just mipmap generation. This is also the reason the declarations of the structures was moved towards the top of the file. v2: Code formatting change suggested by Brian. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Use common vertex setup code for _mesa_meta_Bitmap tooIan Romanick2014-02-111-36/+12
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Add storage to the vertex structure for R, G, B, and AIan Romanick2014-02-111-9/+6
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Use common routine to configure fixed-function TNL stateIan Romanick2014-02-111-23/+8
| | | | | | | | | | | | | Also... glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0) *is* the identity matrix, so drop the unnecessary call to _mesa_Ortho. v2: Rename setup_ff_TNL_for_blit() to setup_ff_tnl_for_blit(). Seems silly to capitalize one out of two to three acronyms in the name (change by anholt, acked by idr). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1) Reviewed-by: Eric Anholt <[email protected]>
* i965: Fix General and Indirect Base Addresses on Broadwell.Kenneth Graunke2014-02-111-2/+2
| | | | | | | | | I set the "address modify enable" bit in the wrong DWord. The first DWord is the high 16 bits of the address, while the second is the low 32-bits and enable bit. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Drop VECTOR_MASK_ENABLE in Broadwell's 3DSTATE_VS packet.Kenneth Graunke2014-02-111-1/+1
| | | | | | | | | | | We never set it on previous generations, but I had to set it in 3DSTATE_PS for correct behavior. For symmetry, I set it in 3DSTATE_VS as well, but there's no actual need to do so. Piglit works fine either way. The documentation also remarks that there should never be a need to program this. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/gs: Fix EndPrimitive on Broadwell.Kenneth Graunke2014-02-111-0/+7
| | | | | | | | | | | | | | | My earlier patch (i965: Reserve space for "Vertex Count" in GS outputs.) incremented Global Offset for most URB writes to make room for the new "Vertex Count" field, but failed to shift the URB writes used for writing control bits. Confusingly, Global Offset must be incremented by 2 here, rather than 1. The URB writes we use for actual data are HWord writes, which treat Global Offset as a 256-bit offset. These are OWord writes, so it's treated as a 128-bit offset instead. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vec4: Support arbitrarily large sampler indices on Broadwell+.Kenneth Graunke2014-02-111-3/+22
| | | | | | | | | | I added support for these on Haswell, but forgot to update the Broadwell code before landing it. Fixes Piglit's max-samplers test. v2: Use get_element_ud() for the destination as well as the source. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Support arbitrarily large sampler indices on Broadwell+.Kenneth Graunke2014-02-111-1/+18
| | | | | | | | | | | I added support for these on Haswell, but forgot to update the Broadwell code before landing it. Partially fixes Piglit's max-samplers test. v2: Use get_element_ud() consistently, rather than using it for the source but using brw_vec1_grf for the destination.. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Fix Broadwell texture header setup to be uncompressed.Kenneth Graunke2014-02-111-0/+5
| | | | | | | | | | MOV_RAW disables masking, but doesn't force the instruction to be uncompressed. That needs to be done by hand. Fixes textureGather and texture offset tests. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: GL_ARB_half_float_pixel is not optionalIan Romanick2014-02-1110-42/+10
| | | | | | | | | | | | | | | | | Almost every driver already supported it. All current and future Gallium drivers always support it, and most existing classic drivers support it. This only changes radeon and nouveau. This extension only adds data types that can be passed to, for example, glTexImage2D. It does not add internal formats. Since you can already pass GL_FLOAT to glTexImage2D this shouldn't pose any additional issues with those drivers. Note that r200 and i915 already supported this extension, and they don't support floating-point textures either. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Fix extension dependency for half-float TexBOsIan Romanick2014-02-111-1/+12
| | | | | | | | | | | Half-float TexBOs should require both GL_ARB_half_float_pixel and GL_ARB_texture_float. This doesn't matter much in practice. Every driver that supports GL_ARB_texture_buffer_object already supports GL_ARB_half_float_pixel. We only expose the TexBO extension in core profiles, and those require GL_ARB_texture_float. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Silence unused parameter warning in _mesa_meta_CopyTexSubImageIan Romanick2014-02-111-0/+6
| | | | | | | | | | | drivers/common/meta.c: In function '_mesa_meta_CopyTexSubImage': drivers/common/meta.c:3744:52: warning: unused parameter 'rb' [-Wunused-parameter] Unfortunately, the parameter can't just be removed because it is part of the dd_function_table::CopyTexSubImage interface. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Silence unused parameter warning in setup_drawpix_textureIan Romanick2014-02-111-6/+5
| | | | | | | | | | | | drivers/common/meta.c: In function 'setup_drawpix_texture': drivers/common/meta.c:1572:30: warning: unused parameter 'texIntFormat' [-Wunused-parameter] setup_drawpix_texture has never used this paramater. Before the refactor commit 04f8193aa it was used in several locations. After that commit, texIntFormat was only used in alloc_texture. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Refactor common VAO and VBO initialization codeIan Romanick2014-02-111-227/+99
| | | | | | | | v2: Clean up some stray binding calls Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1) Reviewed-by: Eric Anholt <[email protected]> (v2)
* meta: Track the _mesa_meta_DrawPixels VBO just like the othersIan Romanick2014-02-111-18/+26
| | | | | | | | | | | | | | | | All of the other meta routines have a particular pattern for creating and tracking the VAO and VBO. This one function deviated from that pattern for no apparent reason. Almost all of the code added in this patch will be removed shortly. v2: Drop glDeleteBuffers() of the old, now-uninitialized vbo variable. Fixes getteximage-formats and fbo-mipmap-copypix regression when "2" landed in the variable (change by anholt). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Expand the vertex structure for the GenerateMipmap and decompress pathsIan Romanick2014-02-111-8/+21
| | | | | | | | | | Final intermediate step leading to some code sharing. Note that the new GemerateMipmap and decompress vertex structures are the same as the new vertex structure in BlitFramebuffer and the others. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Expand the vertex structure for the DrawPixels pathsIan Romanick2014-02-111-10/+13
| | | | | | | | | | Another step leading to some code sharing. Note that the new DrawPixels vertex structure is the same as the new vertex structure in BlitFramebuffer and the others. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Expand the vertex structure for the Clear pathsIan Romanick2014-02-111-8/+9
| | | | | | | | | | | | | Another step leading to some code sharing. Note that the new Clear vertex structure is the same as the new BlitFramebuffer and CopyPixels vertex structure. The "sizeof(float) * 7" hack is temporary. It will magically disappear in a just a couple more patches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>