summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa/main: Make legal_get_tex_level_parameter_target publicAntia Puentes2016-03-032-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | It will be used by the ARB_internalformat_query2 implementation to check if the target is valid for those <pnames> that are said in the spec that should return the same values than the 'glGetTexLevelParameter{if}v' function: - INTERNALFORMAT_RED_SIZE - INTERNALFORMAT_GREEN_SIZE - INTERNALFORMAT_BLUE_SIZE - INTERNALFORMAT_ALPHA_SIZE - INTERNALFORMAT_DEPTH_SIZE - INTERNALFORMAT_STENCIL_SIZE - INTERNALFORMAT_SHARED_SIZE - INTERNALFORMAT_RED_TYPE - INTERNALFORMAT_GREEN_TYPE - INTERNALFORMAT_BLUE_TYPE - INTERNALFORMAT_ALPHA_TYPE - INTERNALFORMAT_DEPTH_TYPE - INTERNALFORMAT_STENCIL_TYPE - IMAGE_FORMAT_COMPATIBILITY_TYPE Reviewed-by: Dave Airlie <[email protected]>
* mesa/formatquery: Added INTERNALFORMAT_PREFERRED pnameEduardo Lima Mitev2016-03-031-1/+14
| | | | Reviewed-by: Dave Airlie <[email protected]>
* mesa/formatquery: Added the INTERNALFORMAT_SUPPORTED <pname> queryAntia Puentes2016-03-031-1/+10
| | | | Reviewed-by: Dave Airlie <[email protected]>
* mesa/formatquery: Added a func to check <internalformat> supportedAntia Puentes2016-03-031-0/+38
| | | | | | | | | | | | | From the ARB_internalformat_query2 specification: "The INTERNALFORMAT_SUPPORTED <pname> can be used to determine if the internal format is supported, and the other <pnames> are defined in terms of whether or not the format is supported." v2: Consider also FBO base formats when checking if the internalformat is supported. Reviewed-by: Dave Airlie <[email protected]>
* mesa/formatquery: Added func to check if the 'resource' is supportedAntia Puentes2016-03-031-1/+90
| | | | | | | | Checks that the 'resource', as defined by the ARB_internalformat_query2 specification, is supported by the implementation for those 'pnames' that require this check. Reviewed-by: Dave Airlie <[email protected]>
* mesa/main: not fill mesa_error on _mesa_legal_texture_base_format_for_targetAlejandro Piñeiro2016-03-033-20/+10
| | | | | | | This would allow to use this method if you are just querying if it is allowed, like for arb_internalformat_query2. Reviewed-by: Dave Airlie <[email protected]>
* mesa/teximage: Make _mesa_format_no_online_compression publicAntia Puentes2016-03-032-1/+4
| | | | | | | | It will be used by the ARB_internalformat_query2 implementation to check if a certain compressed 'internalformat' is supported by texture 'targets'. Reviewed-by: Dave Airlie <[email protected]>
* mesa/teximage: make public is_renderable_texture_formatAntia Puentes2016-03-032-3/+6
| | | | | | | | It will be used by the ARB_internalformat_query2 implementation to check if the 'internalformat' passed is supported by texture MULTISAMPLE 'targets'. Reviewed-by: Dave Airlie <[email protected]>
* mesa/main: Added empty skeleton of glGetInternalformati64vAntia Puentes2016-03-032-0/+20
| | | | Reviewed-by: Dave Airlie <[email protected]>
* mesa: Add dispatch and extension XML for GL_ARB_internalformat_query2Alejandro Piñeiro2016-03-031-0/+4
| | | | | | | | Equivalent to commit bda540 (that added GL_ARB_internalformat_query) v2: include the new xml to to API_XML list at Makefile.am (Emil Velikov) Reviewed-by: Dave Airlie <[email protected]>
* mesa/formatquery: Added boilerplate code to extend GetInternalformativAntia Puentes2016-03-031-99/+349
| | | | | | | | | | | The goal is to extend the GetInternalformativ query to implement the ARB_internalformat_query2 specification, keeping the behaviour defined by the ARB_internalformat_query if ARB_internalformat_query2 is not supported. v2: Don't require ARB_internalformat_query when profile is GLES3. Reviewed-by: Dave Airlie <[email protected]>
* mesa/formatquery: Added a func to check if the <target> is supportedAntia Puentes2016-03-031-0/+70
| | | | | | | | | | | | | | | From the ARB_internalformat_query2 spec: "If the particular <target> and <internalformat> combination do not make sense, or if a particular type of <target> is not supported by the implementation the "unsupported" answer should be given. This is not an error." This function checks if the <target> is supported by the implementation. v2: Allow RENDERBUFFER targets also on GLES 3 profiles. Reviewed-by: Dave Airlie <[email protected]>
* mesa/formatquery: Added function to set 'unsupported' responsesAntia Puentes2016-03-031-0/+106
| | | | | | | | | | | | | | | The ARB_internalformat_query2 specification defines which is the reponse best representing "not supported" or "not applicable" for each <pname>. Queries for unsupported features, targets, internalformats, combinations of: target and internalformat, target and pname, pname and internalformat, do not return an error but the corresponding 'unsupported' response. We will use that response as the default answer. For SAMPLES the 'unsupported' response is to not modify the 'params' buffer. Reviewed-by: Dave Airlie <[email protected]>
* mesa/formatquery: Added function to validate parametersAntia Puentes2016-03-031-0/+227
| | | | | | | | Handles the cases where an error should be returned according to the ARB_internalformat_query and ARB_internalformat_query2 specifications. Reviewed-by: Dave Airlie <[email protected]>
* mesa/main: Add extension tracking bit for ARB_internalformat_query2Antia Puentes2016-03-032-0/+2
| | | | Reviewed-by: Dave Airlie <[email protected]>
* mesa: Completely remove QuerySamplesForFormat from driver func tableEduardo Lima Mitev2016-03-033-33/+0
| | | | | | | At this point, all uses have been replaced by the more general hook QueryInternalFormat, introduced by ARB_internalformat_query2. Reviewed-by: Dave Airlie <[email protected]>
* mesa/formatquery: Use new driver hook QueryInternalFormatEduardo Lima Mitev2016-03-031-28/+14
| | | | | | | | Implements SAMPLES and NUM_SAMPLE_COUNTS queries using the new generic driver call QueryInternalFormat, which is being introduced as replacement of QuerySamplesForFormat to support ARB_internalformat_query2. Reviewed-by: Dave Airlie <[email protected]>
* mesa/formatquery: Remove tracking of number of elements in the responseEduardo Lima Mitev2016-03-031-6/+5
| | | | | | | | | | | | | | | | | Currently, the number of integers returned in the response to GetInternalFormativ is being tracked by a 'count' variable. This is so only the modified elements from the temporary buffer are copied into the original user buffer. However, with the introduction of ARB_internalformat_query2, keeping track of 'count' would complicate the code a lot, considering the high number of queries. So, we propose to forget about tracking count, and move all the 16 elements in the temporary buffer, back to the user buffer (clamped to user buffer size of course). This is basically a trade-off between performance and code clarity. Reviewed-by: Dave Airlie <[email protected]>
* mesa/multisample: Check sample count using the new driver hookEduardo Lima Mitev2016-03-031-4/+9
| | | | | | | Use QueryInternalFormat instead of QuerySamplesForFormat to obtain the highest supported sample. QuerySamplesForFormat is to be removed. Reviewed-by: Dave Airlie <[email protected]>
* st/format: Replace QuerySamplesForFormat by new QueryInternalFormat hookEduardo Lima Mitev2016-03-033-8/+40
| | | | | | The previous code for SAMPLES and NUM_SAMPLE_COUNTS is reused as a private function. Reviewed-by: Dave Airlie <[email protected]>
* i965/formatquery: Respond queries SAMPLES and NUM_SAMPLE_COUNTSEduardo Lima Mitev2016-03-033-4/+15
| | | | | | | | | | This effectively disables old QuerySamplesForFormat driver hook, since it is never called by Mesa anymore. v2: Call brw_query_samples_for_format() with a dummy buffer to calculate num samples, to avoid modifying the original buffer. Reviewed-by: Dave Airlie <[email protected]>
* i965: Move brw_query_samples_for_format() to brw_queryformat.cEduardo Lima Mitev2016-03-033-38/+41
| | | | | | | Now that there is a dedicated source file for internal format queries, this function belongs there. Reviewed-by: Dave Airlie <[email protected]>
* i965: Add boilerplate function for QueryInternalFormat driver hookEduardo Lima Mitev2016-03-034-0/+52
| | | | | | | By default, we call back the driver's hook fallback function that has generic implementations for the all the queries. Reviewed-by: Dave Airlie <[email protected]>
* mesa: Add a default QueryInternalFormat() function for driversEduardo Lima Mitev2016-03-033-0/+22
| | | | | | | This is a fallback function for drivers not implementing ARB_internalformat_query2. Reviewed-by: Dave Airlie <[email protected]>
* mesa: Add QueryInternalFormat to device driver virtual tableEduardo Lima Mitev2016-03-031-0/+20
| | | | | | | | | | | | | This new function queries different driver parameters for a particular target and texture format. It is basically a driver hook to support ARB_internalformat_query2. Since ARB_internalformat_query2 introduced several new query parameters over ARB_internalformat_query, having one driver hook for each parameter is no longer feasible. So this is the generic entry-point for calls to glGetInternalFormativ and glGetInternalFormati64v. Reviewed-by: Dave Airlie <[email protected]>
* mesa: Update commentAnuj Phogat2016-03-021-1/+1
| | | | Signed-off-by: Anuj Phogat <[email protected]>
* mesa: Fix function descriptionAnuj Phogat2016-03-021-1/+1
| | | | Signed-off-by: Anuj Phogat <[email protected]>
* meta: Remove the 'allocate_storage' parameter in _mesa_meta_pbo_GetTexSubImage()Anuj Phogat2016-03-024-7/+3
| | | | | | | | Texture is already allocated before calling this meta function. So, the value of 'allocate_storage' passed to the function is always false. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Fix the pbo usage in meta for GLES{1,2} contextsAnuj Phogat2016-03-021-8/+13
| | | | | | | | | | | | | OpenGL ES 1.0 doesn't support using GL_STREAM_DRAW and both ES 1.0 and 2.0 don't support GL_STREAM_READ in glBufferData(). So, handle it correctly by calling the _mesa_meta_begin() before create_texture_for_pbo(). V2: Remove the changes related to allocate_storage. (Ian) Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* program: Clean up after condition code removal.Matt Turner2016-03-021-5/+3
|
* program: Remove variable used only in assert().Matt Turner2016-03-021-2/+1
|
* program: Drop GL_FRAGMENT_PROGRAM_NV from switch statement.Matt Turner2016-03-021-1/+0
|
* st/mesa: move dereference after null checkThomas Hindoe Paaboel Andersen2016-03-021-1/+3
| | | | | | | | We should not dereference shader before we have done the null check. Reviewed-by: Erik Faye-Lund <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965/gen6/gs: Replace V-immediate with VF-immediate.Matt Turner2016-03-021-5/+5
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* i965: set ctx->Const.MaxViewport{Width,Height} to 32kSamuel Iglesias Gonsálvez2016-03-021-0/+5
| | | | | | | | | | | | | | | From ARB_viewport_array spec: " * On GL3-capable hardware the VIEWPORT_BOUNDS_RANGE should be at least [-16384, 16383]. * On GL4-capable hardware the VIEWPORT_BOUNDS_RANGE should be at least [-32768, 32767]." This range is set using ctx->Const.MaxViewportWidth value, so just bump those constants to 32k for gen7+ which can support OpenGL 4.0. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* main: remove MAX_VIEWPORT_WIDTH and MAX_VIEWPORT_HEIGHT constantsSamuel Iglesias Gonsálvez2016-03-022-7/+2
| | | | | Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* main: call invalidate_framebuffer_storage() with driver's viewport limitsSamuel Iglesias Gonsálvez2016-03-021-2/+4
| | | | | | | Don't use hardcoded ones because the driver can set different ones. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove NV_fragment_program remnants from dlist.c.Matt Turner2016-03-011-14/+7
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* mesa: Remove NV_fragment_program_option enable bit.Matt Turner2016-03-012-2/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program opcode parsing.Matt Turner2016-03-012-9/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program scalar suffix parsing.Matt Turner2016-03-011-17/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program_option parsing support.Matt Turner2016-03-011-44/+5
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program Abs support.Matt Turner2016-03-0110-80/+4
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove incorrect comment about OPCODE_TXD.Matt Turner2016-03-011-1/+1
| | | | | | | | The table in prog_instruction.h is correct. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove OPCODE_TXP_NV.Matt Turner2016-03-015-30/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Clean up after previous commit.Matt Turner2016-03-011-43/+41
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove condition-code and precision support.Matt Turner2016-03-0115-544/+62
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove OPCODE_KIL_NV.Matt Turner2016-03-018-54/+6
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove RelAddr2 support.Matt Turner2016-03-015-41/+3
| | | | | | | | Looks like more never-used crap from the first geometry shader attempt. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Mark table const.Matt Turner2016-03-011-1/+1
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>