summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: add st_create_{texture,image}_handle_from_unit() helperSamuel Pitoiset2017-06-141-0/+41
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: add st_convert_image_from_unit() helperSamuel Pitoiset2017-06-142-11/+27
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: make convert_sampler_from_unit() non-staticSamuel Pitoiset2017-06-142-6/+13
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: make update_single_texture() non-staticSamuel Pitoiset2017-06-142-6/+14
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: implement ARB_bindless_textureSamuel Pitoiset2017-06-141-0/+84
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: record bindless samplers/images usageSamuel Pitoiset2017-06-142-0/+49
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: teach rename_temp_registers() about bindless samplersSamuel Pitoiset2017-06-141-0/+6
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: teach the DCE pass about bindless samplers/imagesSamuel Pitoiset2017-06-141-0/+15
| | | | | | | | | | When a texture (or an image) instruction uses a bindless sampler (respectively a bindless image), make sure the DCE pass won't remove code when the resource is a temporary variable. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: add support for bindless pack/unpack operationsSamuel Pitoiset2017-06-141-5/+4
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: add support for bindless imagesSamuel Pitoiset2017-06-141-12/+87
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: add support for bindless samplersSamuel Pitoiset2017-06-141-5/+18
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi/ureg: accept TGSI_FILE_{CONSTANT,INPUT} for dst registersSamuel Pitoiset2017-06-141-2/+0
| | | | | | | | | For example, TGSI_OPCODE_STORE for bindless images might use a constant buffer or a shader input. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* tc: add ARB_bindless_texture supportSamuel Pitoiset2017-06-143-1/+133
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* trace: add ARB_bindless_texture supportSamuel Pitoiset2017-06-141-0/+112
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: add ARB_bindless_texture supportSamuel Pitoiset2017-06-141-0/+60
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add ARB_bindless_texture interfaceSamuel Pitoiset2017-06-142-0/+79
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add PIPE_CAP_BINDLESS_TEXTURESamuel Pitoiset2017-06-1417-0/+18
| | | | | | | | | Whether bindless texture operations are supported by the underlying driver. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: fix setting uniform variables for bindless samplers/imagesSamuel Pitoiset2017-06-141-6/+19
| | | | | | | | | This fixes a 64-bit vs 32-bit mismatch when setting an array of bindless samplers. Also, we need to unconditionally set size_mul to 2 when the underlying uniform is bindless. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: handle bindless uniforms bound to texture/image unitsSamuel Pitoiset2017-06-141-6/+116
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: associate uniform storage to bindless samplers/imagesSamuel Pitoiset2017-06-141-0/+25
| | | | | | | | | | | When a bindless sampler/image is bound to a texture/image unit, we have to overwrite the constant value by the resident handle directly in the constant buffer before the next draw. One solution is to keep track of a pointer to the data. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: pass gl_program to _mesa_associate_uniform_storage()Samuel Pitoiset2017-06-145-11/+9
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: update textures for bindless samplers bound to texture unitsSamuel Pitoiset2017-06-142-2/+33
| | | | | | | | This is analogous to the existing SamplerUnits and SamplerTargets, but it loops over bindless samplers bound to texture units. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add update_single_program_texture_state() helperSamuel Pitoiset2017-06-141-13/+23
| | | | | | | | This will also be used for looping over bindless samplers bound to texture units. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add update_single_shader_texture_used() helperSamuel Pitoiset2017-06-141-29/+38
| | | | | | | | This will also be used for looping over bindless samplers bound to texture units. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: add ir_variable::contains_bindless()Samuel Pitoiset2017-06-141-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: set the explicit binding value for bindless samplers/imagesSamuel Pitoiset2017-06-141-6/+29
| | | | | | | | | This handles a situation like: layout (bindless_sampler, binding = 7) uniform sampler2D; Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: pass the ir_variable object to set_opaque_binding()Samuel Pitoiset2017-06-141-3/+4
| | | | | | | | In order to set the explicit binding value for bindless samplers/images. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: process uniform images declared bindlessSamuel Pitoiset2017-06-143-9/+89
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: process uniform samplers declared bindlessSamuel Pitoiset2017-06-143-11/+99
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add infrastructure for bindless samplers/images bound to unitsSamuel Pitoiset2017-06-141-0/+52
| | | | | | | | | | | | | | | | | | | Yes, ARB_bindless_texture allows to do this. In other words, in a situation like: layout (bindless_sampler) uniform sampler2D tex; The 'tex' sampler uniform can be either set with glUniform1() (old-style bound samplers) or with glUniformHandleui() (resident handles). When glUniform1() is used, we have to somehow make the texture resident "under the hood". This is done by requesting a texture handle to the driver, making the handle resident in the current context and overwriting the value directly in the constant buffer. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: store bindless samplers as PROGRAM_UNIFORMSamuel Pitoiset2017-06-141-1/+1
| | | | | | | | Old-style samplers (ie. bound samplers) are stored as PROGRAM_SAMPLER, while bindless ones are PROGRAM_UNIFORM. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: keep track of the current variable in add_uniform_to_shaderSamuel Pitoiset2017-06-141-0/+2
| | | | | | | | | | | | Bindless samplers are considered PROGRAM_UNIFORM but add_uniform_to_shader::visit_field() is based on glsl_type. Because only ir_variable knows if the uniform variable is bindless via ir_variable::bindless, store it instead of adding a new parameter to visit_field(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: refuse to change tex buffers when a handle is allocatedSamuel Pitoiset2017-06-141-2/+2
| | | | | | | | | | | The ARB_bindless_texture spec says: "The error INVALID_OPERATION is generated by BufferData if it is called to modify a buffer object bound to a buffer texture while that texture object is referenced by one or more texture handles." Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: refuse to change textures when a handle is allocatedSamuel Pitoiset2017-06-141-1/+24
| | | | | | | | | | | | The ARB_bindless_texture spec says: "The error INVALID_OPERATION is generated by TexImage*, CopyTexImage*, CompressedTexImage*, TexBuffer*, TexParameter*, as well as other functions defined in terms of these, if the texture object to be modified is referenced by one or more texture or image handles." Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: refuse to update tex parameters when a handle is allocatedSamuel Pitoiset2017-06-141-0/+38
| | | | | | | | | | | | | The ARB_bindless_texture spec says: "The ARB_bindless_texture spec says: "The error INVALID_OPERATION is generated by TexImage*, CopyTexImage*, CompressedTexImage*, TexBuffer*, TexParameter*, as well as other functions defined in terms of these, if the texture object to be modified is referenced by one or more texture or image handles." Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: refuse to update sampler parameters when a handle is allocatedSamuel Pitoiset2017-06-141-11/+22
| | | | | | | | | | | The ARB_bindless_texture spec says: "The error INVALID_OPERATION is generated by SamplerParameter* if <sampler> identifies a sampler object referenced by one or more texture handles." Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add support for glUniformHandleui64*ARB()Samuel Pitoiset2017-06-146-0/+92
| | | | | | | | | | | | | | Bindless sampler/image handles are represented using 64-bit unsigned integers. The ARB_bindless_texture spec says: "The error INVALID_OPERATION is generated by UniformHandleui64{v}ARB if the sampler or image uniform being updated has the "bound_sampler" or "bound_image" layout qualifier"." Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add support for unsigned 64-bit vertex attributesSamuel Pitoiset2017-06-146-3/+55
| | | | | | | | This adds support in the VBO and array code to handle unsigned 64-bit vertex attributes as specified by ARB_bindless_texture. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: implement ARB_bindless_textureSamuel Pitoiset2017-06-148-7/+960
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/util: add a hash table wrapper which support 64-bit keysSamuel Pitoiset2017-06-142-0/+172
| | | | | | | | | Needed for bindless handles which are represented using 64-bit unsigned integers. All hash table implementations should be uniformized later on. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: move some hash declarations to hash.hSamuel Pitoiset2017-06-142-56/+56
| | | | | | | These will be used by the bindless hash tables to initialize the default deleted key value. Signed-off-by: Samuel Pitoiset <[email protected]>
* mesa/util: add new util_dynarray_delete_unordered helperSamuel Pitoiset2017-06-141-0/+14
| | | | | | | | This helper function will be used for managing dynamic arrays of resident texture/image handles. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mapi: add GL_ARB_bindless_texture entry pointsSamuel Pitoiset2017-06-1419-1/+363
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* clover/device: Get device/host unified memory from pipe driverAaron Watry2017-06-133-1/+7
| | | | | | | clinfo no longer reports my discrete GCN card as unified memory Signed-off-by: Aaron Watry <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* gallium/radeon: Include the family name in the renderer string if it's not ↵Henri Verbeet2017-06-131-14/+18
| | | | | | | | | | | equal to the marketing name. The "family" name is often more informative than the "marketing" name. More importantly, applications, like for example Wine, may recognise GPUs based on the existing "family" names. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Henri Verbeet <[email protected]>
* gallium/docs: clarify TGSI_SEMANTIC_SAMPLEMASK, againBrian Paul2017-06-131-4/+11
| | | | | | | | | I've since discovered the fragment shader sample mask system value (which corresponds to gl_SampleMaskIn). v2: It's a system value, not a shader input. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: unmap the stream_uploader buffer before drawingBrian Paul2017-06-131-0/+4
| | | | | | | | | | | | | Some drivers require that the vertex buffers be unmapped prior to drawing. This change unmaps the stream_uploader buffer after we've uploaded the zero-stride attributes (unless the driver supports rendering with mapped buffers). This fixes a regression in the VMware driver since 17f776c27be266f2. Some Mesa demos such as mandelbrot and brick would display black quads instead of the expected rendering. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: whitespace, formatting fixes in u_upload_mgr.cBrian Paul2017-06-131-25/+29
| | | | Reviewed-by: Marek Olšák <[email protected]>
* egl: improve dri2_fallback_swap_buffers_with_damage()Eric Engestrom2017-06-131-0/+1
| | | | | | | Let's (try to) set damages before swapping buffers. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* softpipe: Match pipe_context::render_condition prototype.Jose Fonseca2017-06-132-5/+5
| | | | To silence compiler warnings. Trivial.