Nicolai Hähnle
fa5ae8db2e
ac/nir: start using ac_shader_abi
...
v2: update for LLVMValueRefs in ac_shader_abi
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:31 +02:00
Nicolai Hähnle
61ad2f13c3
ac,radeonsi: move some VS input descriptions to ac_shader_abi
...
v2: use LLVM values instead of function parameter indices
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:31 +02:00
Nicolai Hähnle
c7e9ebb3ab
radeonsi: store shader function arguments in a structure
...
Aligns the code a bit more with ac/nir, and simplifies the setup of
ac_shader_abi.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:31 +02:00
Nicolai Hähnle
00476907fc
gallium/targets: link against NIR when building radeonsi
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:30 +02:00
Nicolai Hähnle
e044e9eb2a
st/glsl_to_nir: move nir_lower_io to drivers
...
This allows drivers more freedom in how exactly they want to lower I/O,
e.g. first lowering I/O to temporaries.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:30 +02:00
Nicolai Hähnle
c5f97eab09
st/mesa: get rid of st_glsl_types
...
It's a duplicate of glsl_type::count_attribute_slots.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:30 +02:00
Nicolai Hähnle
2cf8c84619
st/glsl_to_nir: use nir_lower_samplers_as_deref when requested by the driver
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:29 +02:00
Nicolai Hähnle
06d038c4bd
st/glsl_to_nir: fix the case where NIR clone testing is enabled
...
In that case, prog->nir must be assigned at the end.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:29 +02:00
Nicolai Hähnle
01f1598a40
gallium: add PIPE_CAP_NIR_SAMPLERS_AS_DEREF
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:29 +02:00
Nicolai Hähnle
e902ac3268
nir: add nir_lower_uniforms_to_ubo pass
...
This is a further lowering of default-block uniform loads that transforms
load_uniform intrinsics into load_ubo intrinsics. This simplifies the rest
of the backend.
v2: transform from load_uniform instead of straight from variables
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-07-31 14:55:29 +02:00
Nicolai Hähnle
bce6f99875
nir: add nir_lower_samplers_as_deref pass
...
This pass is a replacement for the nir_lower_samplers pass, which has the
advantage of keeping sampler references as derefs. This allows a unified
treatment of texture instructions and image intrinsics in the backend.
2017-07-31 14:55:29 +02:00
Nicolai Hähnle
f1da97ef7a
nir: add load_frag_coord system value intrinsic
...
Some drivers prefer to treat gl_FragCoord as a system value rather than
a fragment shader input, see Const.GLSLFragCoordIsSysVal.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-07-31 14:55:28 +02:00
Nicolai Hähnle
5011923e09
nir: fix nir_lower_wpos_ytransform when gl_FragCoord is a system value
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-07-31 14:55:28 +02:00
Nicolai Hähnle
b27c2d402e
nir: add nir_instr_rewrite_deref
...
Allows modifying a texture instruction's texture and sampler derefs.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-07-31 14:55:28 +02:00
Samuel Pitoiset
540b1a8f0b
mesa: add KHR_no_error support to glPointSize()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
1693ab6c3a
mesa: add point_size() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
d88d60ab1d
mesa: add KHR_no_error support to glVertexArrayElementBuffer()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
1429b5cd59
mesa: add vertex_array_element_buffer() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
80a845538a
mesa: add KHR_no_error support to glTextureSubImage*D()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
de0b1e5a81
mesa: add texturesubimage_error() helper
...
And make texturesubimage() always inline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
ffe8813b02
mesa: add KHR_no_error support to glDetachShader() and glDetachObjectARB()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
6b9087a45d
mesa: add detach_shader_error() helper
...
And make detach_shader() always inline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
c8ea792723
mesa: add KHR_no_error support to glDrawTransformFeedback*()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
a187fcf584
mesa: add KHR_no_error support to glNamedFramebufferDrawBuffers()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
9337e4d38a
mesa: add KHR_no_error support to glDrawBuffers()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
966108a803
mesa: add draw_buffers_error() helper
...
And make draw_buffers() always inline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
1dd2003396
mesa: add KHR_no_error support to glDeleteBuffers()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:40 +02:00
Samuel Pitoiset
fc039e9ff4
mesa: add delete_buffers() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
7bc50dfe79
mesa: add KHR_no_error support to glNamedFramebufferRenderbuffer()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
0a20e43ff0
mesa: add KHR_no_error support to glFramebufferRenderbuffer()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
55188f7db8
mesa: add framebuffer_renderbuffer_error() helper
...
And make framebuffer_renderbuffer() always inline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
ad427f54aa
mesa: add KHR_no_error support to glDeleteTextures()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
488af1292a
mesa: add delete_textures() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
8bf786d13d
mesa: add KHR_no_error support to glNamedFramebufferDrawBuffer()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
0238976665
mesa: add KHR_no_error support to glDrawBuffer()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
e42775ba68
mesa: add draw_buffer_error() helper
...
And make draw_buffer() always inline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
d952485d7c
mesa: add KHR_no_error support to glBindTextures()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
90f691b5be
mesa: add bind_textures() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
9f1fab9533
mesa: add KHR_no_error support to glBindTexture()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
cba013d423
mesa: add bind_texture() helper
...
For KHR_no_error support.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
a77768bf60
mesa: rename bind_texture() to bind_texture_object()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
a43ac5e7c4
mesa: add KHR_no_error support to glMemoryBarrierByRegion()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
4de0033d73
mesa: add memory_barrier_by_region() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
d21ae02fb2
mesa: add KHR_no_error support to glMultiDrawArrays()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
e98cb5bbca
mesa: add KHR_no_error support to glMinSampleShading()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
bd805a3c31
mesa: add min_sample_shading() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
d5d01193f4
mesa: add KHR_no_error support to glBlendEquationSeparate()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
4141fab9ed
mesa: add blend_equation_separate() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
6f6c5a1ad7
mesa: add KHR_no_error support to glPrimitiveRestartIndex()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00
Samuel Pitoiset
de4e5b4dac
mesa: add primitive_restart_index() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-07-31 13:53:39 +02:00