Compare commits
83 Commits
25.0
...
mesa-10.6.
Author | SHA1 | Date | |
---|---|---|---|
|
3b9cde5c81 | ||
|
9719f26cc6 | ||
|
81027ea1e2 | ||
|
a439cafc7c | ||
|
1c2a462125 | ||
|
279b1d85cc | ||
|
28b3e4f925 | ||
|
ea3d26eeb4 | ||
|
39aa6b8bea | ||
|
1a47d37c99 | ||
|
a2f216b329 | ||
|
9b8d492781 | ||
|
ef90205704 | ||
|
c6184b2b5c | ||
|
bf538839ed | ||
|
7abb5e3f13 | ||
|
2353b2197c | ||
|
10b7dba331 | ||
|
55104870a1 | ||
|
fbc04dcddb | ||
|
8631c00acb | ||
|
add82b672d | ||
|
3514680b91 | ||
|
4f68af254e | ||
|
70ac6a2655 | ||
|
9dc43dc361 | ||
|
038fc5a7f7 | ||
|
66e1ee52ad | ||
|
bc8fa4311e | ||
|
eafe639aee | ||
|
97eb22e959 | ||
|
964d358bc1 | ||
|
384ee736e7 | ||
|
3599928fc6 | ||
|
0330429005 | ||
|
828eeb65dc | ||
|
74e7328281 | ||
|
9e71637022 | ||
|
83eed1ea90 | ||
|
7ddacf6df3 | ||
|
83007290c6 | ||
|
38fb22cece | ||
|
1deda22b88 | ||
|
ef6670ca43 | ||
|
b8c030d9cf | ||
|
9c04f375db | ||
|
944bf20c17 | ||
|
b4da1d9ebd | ||
|
75691166be | ||
|
8c57dc26a7 | ||
|
230891cc9c | ||
|
ffd133bdbe | ||
|
77b116f1d3 | ||
|
1eef92e336 | ||
|
317fa3e7ef | ||
|
580351d3d3 | ||
|
534f5e8d80 | ||
|
74e2db8a92 | ||
|
c288bf3b89 | ||
|
18e05588df | ||
|
407e20d45d | ||
|
5eef18390d | ||
|
34ff020aea | ||
|
8fc109160e | ||
|
cb0c057a31 | ||
|
60294f8c39 | ||
|
6319fd51fe | ||
|
08baacb6db | ||
|
c23bbfc007 | ||
|
aa326e4e22 | ||
|
1595955974 | ||
|
a760db21ec | ||
|
2cf0e748c3 | ||
|
564c56de12 | ||
|
45986bd391 | ||
|
90644f9217 | ||
|
61c6819d1a | ||
|
bf33fc653d | ||
|
e4f74121db | ||
|
62fda88080 | ||
|
4c83138e5f | ||
|
f02f25dcf7 | ||
|
7c5cca5ee2 |
@@ -649,6 +649,7 @@ if test "x$enable_asm" = xyes; then
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
|
||||
AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
|
||||
AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
|
||||
|
||||
dnl Check to see if dlopen is in default libraries (like Solaris, which
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.6.0 Release Notes / TBD</h1>
|
||||
<h1>Mesa 10.6.0 Release Notes / June 14, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.6.0 is a new development release.
|
||||
@@ -71,7 +71,246 @@ Note: some of the new features are only available with certain drivers.
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
TBD.
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=15006">Bug 15006</a> - translate & rotate the line cause Aliasing</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=27007">Bug 27007</a> - Lines disappear with GL_LINE_SMOOTH</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28832">Bug 28832</a> - piglit/general/line-aa-width fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45348">Bug 45348</a> - [swrast] piglit fbo-drawbuffers-arbfp regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60797">Bug 60797</a> - 1px lines in octave plot aliased to 0</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67564">Bug 67564</a> - HiZ buffers are much larger than necessary</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69226">Bug 69226</a> - Cannot enable basic shaders with Second Life aborts attempt</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71591">Bug 71591</a> - Second Life shaders fail to compile (extension declared in middle of shader)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79202">Bug 79202</a> - valgrind errors in glsl-fs-uniform-array-loop-unroll.shader_test; random code generation</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=81025">Bug 81025</a> - [IVB/BYT Bisected]Piglit spec_ARB_draw_indirect_arb_draw_indirect-draw-elements-prim-restart-ugly fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82477">Bug 82477</a> - [softpipe] piglit fp-long-alu regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82668">Bug 82668</a> - Can't set int attributes to certain values on 32-bit</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82831">Bug 82831</a> - i965: Support GL_ARB_blend_func_extended in SIMD16</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=83962">Bug 83962</a> - [HSW/BYT]Piglit spec_ARB_gpu_shader5_arb_gpu_shader5-emitstreamvertex_nodraw fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84613">Bug 84613</a> - [G965, bisected] piglit regressions : glslparsertest.glsl2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86747">Bug 86747</a> - Noise in Football Manager 2014 textures</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86792">Bug 86792</a> - [NVC0] Portal 2 Crashes in Wine</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86811">Bug 86811</a> - [BDW/BSW Bisected]Piglit spec_arb_shading_language_packing_execution_built-in-functions_vs-unpackSnorm4x8 fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86837">Bug 86837</a> - kodi segfault since auxiliary/vl: rework the build of the VL code</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86944">Bug 86944</a> - glsl_parser_extras.cpp", line 1455: Error: Badly formed expression. (Oracle Studio)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86974">Bug 86974</a> - INTEL_DEBUG=shader_time always asserts in fs_generator::generate_code() when Mesa is built with --enable-debug (= with asserts)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86980">Bug 86980</a> - [swrast] piglit fp-rfl regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=87258">Bug 87258</a> - [BDW/BSW Bisected]Piglit spec_ARB_shader_atomic_counters_array-indexing fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88246">Bug 88246</a> - Commit 2881b12 causes 43 DrawElements test regressions</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88248">Bug 88248</a> - Calling glClear while there is an occlusion query in progress messes up the results</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88521">Bug 88521</a> - GLBenchmark 2.7 TRex renders with artifacts on Gen8 with !UXA</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88534">Bug 88534</a> - include/c11/threads_posix.h PTHREAD_MUTEX_RECURSIVE_NP not defined</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88561">Bug 88561</a> - [radeonsi][regression,bisected] Depth test/buffer issues in Portal</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88793">Bug 88793</a> - [BDW/BSW Bisected]Piglit/shaders_glsl-max-varyings fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88815">Bug 88815</a> - Incorrect handling of GLSL #line directive</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88883">Bug 88883</a> - ir-a2xx.c: variable changed in assert statement</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88885">Bug 88885</a> - Transform feedback uses incorrect interleaving if a previous draw did not write gl_Position</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88905">Bug 88905</a> - [SNB+ Bisected]Ogles3conform ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88999">Bug 88999</a> - [SKL] Compiz crashes after opening unity dash</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89014">Bug 89014</a> - PIPE_QUERY_GPU_FINISHED is not acting as expected on SI</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89026">Bug 89026</a> - Renderbuffer layered state used for framebuffer completeness test</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89032">Bug 89032</a> - [BDW/BSW/SKL Bisected]Piglit spec_OpenGL_1.1_infinite-spot-light fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89037">Bug 89037</a> - [SKL]Piglit spec_EXT_texture_array_copyteximage_1D_ARRAY_samples=2 sporadically causes GPU hang</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89039">Bug 89039</a> - [SKL]etqw system hang</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89058">Bug 89058</a> - [SKL]Render error in some games (etqw-demo, nexuiz, portal)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89068">Bug 89068</a> - glTexImage2D regression by texstore_rgba switch to _mesa_format_convert</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89069">Bug 89069</a> - Lack of grass in The Talos Principle on radeonsi (native\wine\nine)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89094">Bug 89094</a> - [SNB/IVB/HSW/BYT Bisected]Ogles3conform ES3-CTS.gtf.GL3Tests.shadow.shadow_execution_vert fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89095">Bug 89095</a> - [SNB/IVB/BYT Bisected]Webglc conformance/glsl/functions/glsl-function-mix-float.html fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89112">Bug 89112</a> - u_atomic_test: u_atomic_test.c:124: test_atomic_8bits_bool: Assertion `r == 65 && "p_atomic_add"' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89118">Bug 89118</a> - [SKL Bisected]many Ogles3conform cases core dumped</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89131">Bug 89131</a> - [Bisected] Graphical corruption in Weston, shows old framebuffer pieces</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89156">Bug 89156</a> - r300g: GL_COMPRESSED_RED_RGTC1 / ATI1N support broken</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89180">Bug 89180</a> - [IVB regression] Rendering issues in Mass Effect through VMware Workstation</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89210">Bug 89210</a> - GS statistics fail on SNB</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89218">Bug 89218</a> - lower_instructions.cpp:648:48: error: invalid suffix 'd' on floating constant</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89224">Bug 89224</a> - Incorrect rendering of Unigine Valley running in VM on VMware Workstation</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89260">Bug 89260</a> - macros.h:34:25: fatal error: util/u_math.h: No such file or directory</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89292">Bug 89292</a> - [regression,bisected] incomplete screenshots in some cases</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89311">Bug 89311</a> - [regression, bisected] dEQP: Added entry points for glCompressedTextureSubImage*D.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89312">Bug 89312</a> - [regression, bisected] main: Added entry points for CopyTextureSubImage*D. (d6b7c40cecfe01)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89315">Bug 89315</a> - [HSW, regression, bisected] i965/fs: Emit MAD instructions when possible.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89317">Bug 89317</a> - [HSW, regression, bisected] i965: Add LINTERP/CINTERP to can_do_cmod() (d91390634)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89328">Bug 89328</a> - python required to build Mesa release tarballs</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89342">Bug 89342</a> - main/light.c:159:62: error: 'M_PI' undeclared (first use in this function)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89343">Bug 89343</a> - compiler/tests/radeon_compiler_optimize_tests.c:43:3: error: implicit declaration of function ‘fprintf’ [-Werror=implicit-function-declaration]</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89345">Bug 89345</a> - imports.h:452:58: error: expected declaration specifiers or '...' before 'va_list'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89364">Bug 89364</a> - c99_alloca.h:40:22: fatal error: alloca.h: No such file or directory</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89372">Bug 89372</a> - [softpipe] piglit glsl-1.50 generate-zero-primitives regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89387">Bug 89387</a> - Double delete in lp_bld_misc.cpp</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89416">Bug 89416</a> - UE4Editor crash after load project</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89430">Bug 89430</a> - [g965][bisected] arb_copy_image-targets gl_texture* tests fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89433">Bug 89433</a> - GCC 4.2 does not support -Wvla</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89455">Bug 89455</a> - [NVC0/Gallium] Unigine Heaven black and white boxes</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89457">Bug 89457</a> - [BSW Bisected]ogles3conform ES3-CTS.gtf.GL3Tests.shadow.shadow_execution_vert fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89477">Bug 89477</a> - include/no_extern_c.h:47:1: error: template with C linkage</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89508">Bug 89508</a> - Bad int(floatBitsToInt(vec4))</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89530">Bug 89530</a> - FTBFS in loader: missing fstat</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89569">Bug 89569</a> - Papo & Yo crash on startup [HSW]</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89590">Bug 89590</a> - Crash in glLinkProgram with shaders with multiple constant arrays</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89662">Bug 89662</a> - context.c:943: undefined reference to `_glapi_new_nop_table'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89670">Bug 89670</a> - cmod_propagation_test.andnz_one regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89679">Bug 89679</a> - [NV50] Portal/Half-Life 2 will not start (native Steam)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89689">Bug 89689</a> - [Regression] Weston on DRM backend won't start with new version of mesa</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89722">Bug 89722</a> - [ILK Bisected]Ogles2conform/ES2-CTS.gtf.GL.equal.equal_vec2_frag fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89726">Bug 89726</a> - [Bisected] dEQP-GLES3: uniform linking logic in the presence of structs</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89746">Bug 89746</a> - Mesa and LLVM 3.6+ break opengl for genymotion</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89754">Bug 89754</a> - vertexAttrib fails WebGL Conformance test with mesa drivers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89758">Bug 89758</a> - pow WebGL Conformance test with mesa drivers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89759">Bug 89759</a> - WebGL OGL ES GLSL conformance test with mesa drivers fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89831">Bug 89831</a> - [r600] r600_asm.c:310:assign_alu_units: Assertion `0' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89899">Bug 89899</a> - nir/nir_lower_tex_projector.c:112: error: unknown field ‘ssa’ specified in initializer</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89957">Bug 89957</a> - vm protection faults in piglit lest: texsubimage cube_map_array pbo</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89960">Bug 89960</a> - [softpipe] piglit copy-pixels regreession</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89961">Bug 89961</a> - [BDW/BSW Bisected]Synmark2_v6 OglDrvRes/OglDrvShComp/OglDrvState/OglPSPom Image Validation fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89963">Bug 89963</a> - lp_bld_debug.cpp:100:31: error: no matching function for call to ‘llvm::raw_ostream::raw_ostream()’</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90000">Bug 90000</a> - [i965 Bisected NIR] Piglit/gglean_fragprog1-z-write_test fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90109">Bug 90109</a> - [SNB+ Bisected]Ogles3conform ES3-CTS.shaders.uniform_block.random.basic_arrays.3 fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90114">Bug 90114</a> - [SNB+ Bisected]Ogles3conform ES3-CTS.shaders.struct.uniform.sampler_array_fragment fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90130">Bug 90130</a> - gl_PrimitiveId seems to reset at 340</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90147">Bug 90147</a> - swrast: build error undeclared _SC_PHYS_PAGES on osx</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90149">Bug 90149</a> - [SNB+ Bisected]ES3-CTS.gtf.GL3Tests.uniform_buffer_object.uniform_buffer_object_getactiveuniformsiv_for_nonexistent_uniform_indices fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90153">Bug 90153</a> - [SKL Bisected]ES3-CTS.gtf.GL3Tests.uniform_buffer_object.uniform_buffer_object_all_valid_basic_types fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90167">Bug 90167</a> - [softpipe] piglit depthstencil-default_fb-drawpixels-32f_24_8_rev regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90207">Bug 90207</a> - [r600g, bisected] regression: NI/Turks crash on WebGL Water (most WebGL stuff)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90213">Bug 90213</a> - glDrawPixels with GL_COLOR_INDEX never returns.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90243">Bug 90243</a> - [bisected] regression: spec.!opengl 3_2.get-active-attrib-returns-all-inputs</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90258">Bug 90258</a> - [IVB] spec.glsl-1_10.execution.fs-dfdy-accuracy fails intermittently</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90310">Bug 90310</a> - Fails to build gallium_dri.so at linking stage with clang because of multiple redefinitions</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90350">Bug 90350</a> - [G96] Portal's portal are incorrectly rendered</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90363">Bug 90363</a> - [nv50] HW state is not reset correctly when using a new GL context</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90397">Bug 90397</a> - ARB_program_interface_query: glGetProgramResourceiv() returns wrong value for GL_REFERENCED_BY_*_SHADER prop for GL_UNIFORM for members of an interface block with an instance name</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90466">Bug 90466</a> - arm: linker error ndefined reference to `nir_metadata_preserve'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90520">Bug 90520</a> - Register spilling clobbers registers used elsewhere in the shader</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90547">Bug 90547</a> - [BDW/BSW/SKL Bisected]Piglit/glean@vertprog1-rsq_test_2_(reciprocal_square_root_of_negative_value) fais</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90580">Bug 90580</a> - [HSW bisected] integer multiplication bug</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90629">Bug 90629</a> - [i965] SIMD16 dual_source_blend assertion `src[i].file != GRF || src[i].width == dst.width' failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90749">Bug 90749</a> - [BDW Bisected]dEQP-GLES3.functional.rasterization.fbo.rbo_multisample_max.primitives.lines_wide fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90830">Bug 90830</a> - [bsw bisected regression] GPU hang for spec.arb_gpu_shader5.execution.sampler_array_indexing.vs-nonzero-base</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90839">Bug 90839</a> - [10.5.5/10.6 regression, bisected] PBO glDrawPixels no longer using blit fastpath</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90905">Bug 90905</a> - mesa: Finish subdir-objects transition</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=9951">Bug 9951</a> - GL_LINE_SMOOTH and GL_POLYGON_SMOOTH with i965 driver</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
|
@@ -72,4 +72,5 @@ noinst_LTLIBRARIES = libglsl_util.la
|
||||
libglsl_util_la_SOURCES = \
|
||||
mesa/main/imports.c \
|
||||
mesa/program/prog_hash_table.c \
|
||||
mesa/program/symbol_table.c
|
||||
mesa/program/symbol_table.c \
|
||||
mesa/program/dummy_errors.c
|
||||
|
@@ -131,7 +131,7 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
|
||||
break;
|
||||
}
|
||||
|
||||
ctx->Flags = val;
|
||||
ctx->Flags |= val;
|
||||
break;
|
||||
|
||||
case EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR:
|
||||
@@ -194,7 +194,8 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
|
||||
break;
|
||||
}
|
||||
|
||||
ctx->Flags = EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR;
|
||||
if (val == EGL_TRUE)
|
||||
ctx->Flags |= EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@@ -300,6 +300,8 @@ void cso_destroy_context( struct cso_context *ctx )
|
||||
unsigned i, shader;
|
||||
|
||||
if (ctx->pipe) {
|
||||
ctx->pipe->set_index_buffer(ctx->pipe, NULL);
|
||||
|
||||
ctx->pipe->bind_blend_state( ctx->pipe, NULL );
|
||||
ctx->pipe->bind_rasterizer_state( ctx->pipe, NULL );
|
||||
|
||||
@@ -326,13 +328,18 @@ void cso_destroy_context( struct cso_context *ctx )
|
||||
|
||||
ctx->pipe->bind_depth_stencil_alpha_state( ctx->pipe, NULL );
|
||||
ctx->pipe->bind_fs_state( ctx->pipe, NULL );
|
||||
ctx->pipe->set_constant_buffer(ctx->pipe, PIPE_SHADER_FRAGMENT, 0, NULL);
|
||||
ctx->pipe->bind_vs_state( ctx->pipe, NULL );
|
||||
ctx->pipe->set_constant_buffer(ctx->pipe, PIPE_SHADER_VERTEX, 0, NULL);
|
||||
if (ctx->has_geometry_shader) {
|
||||
ctx->pipe->bind_gs_state(ctx->pipe, NULL);
|
||||
ctx->pipe->set_constant_buffer(ctx->pipe, PIPE_SHADER_GEOMETRY, 0, NULL);
|
||||
}
|
||||
if (ctx->has_tessellation) {
|
||||
ctx->pipe->bind_tcs_state(ctx->pipe, NULL);
|
||||
ctx->pipe->set_constant_buffer(ctx->pipe, PIPE_SHADER_TESS_CTRL, 0, NULL);
|
||||
ctx->pipe->bind_tes_state(ctx->pipe, NULL);
|
||||
ctx->pipe->set_constant_buffer(ctx->pipe, PIPE_SHADER_TESS_EVAL, 0, NULL);
|
||||
}
|
||||
ctx->pipe->bind_vertex_elements_state( ctx->pipe, NULL );
|
||||
|
||||
|
@@ -1965,7 +1965,7 @@ draw_llvm_set_sampler_state(struct draw_context *draw,
|
||||
for (i = 0; i < draw->num_samplers[PIPE_SHADER_VERTEX]; i++) {
|
||||
struct draw_jit_sampler *jit_sam = &draw->llvm->jit_context.samplers[i];
|
||||
|
||||
if (draw->samplers[i]) {
|
||||
if (draw->samplers[PIPE_SHADER_VERTEX][i]) {
|
||||
const struct pipe_sampler_state *s
|
||||
= draw->samplers[PIPE_SHADER_VERTEX][i];
|
||||
jit_sam->min_lod = s->min_lod;
|
||||
@@ -1978,7 +1978,7 @@ draw_llvm_set_sampler_state(struct draw_context *draw,
|
||||
for (i = 0; i < draw->num_samplers[PIPE_SHADER_GEOMETRY]; i++) {
|
||||
struct draw_jit_sampler *jit_sam = &draw->llvm->gs_jit_context.samplers[i];
|
||||
|
||||
if (draw->samplers[i]) {
|
||||
if (draw->samplers[PIPE_SHADER_GEOMETRY][i]) {
|
||||
const struct pipe_sampler_state *s
|
||||
= draw->samplers[PIPE_SHADER_GEOMETRY][i];
|
||||
jit_sam->min_lod = s->min_lod;
|
||||
|
@@ -42,6 +42,7 @@
|
||||
#include "pipe/p_compiler.h"
|
||||
|
||||
#include "c99_math.h"
|
||||
#include <assert.h>
|
||||
#include <float.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
@@ -21,6 +21,8 @@ libfreedreno_la_SOURCES = \
|
||||
|
||||
noinst_PROGRAMS = ir3_compiler
|
||||
|
||||
# XXX: Required due to the C++ sources in libnir/libglsl_util
|
||||
nodist_EXTRA_ir3_compiler_SOURCES = dummy.cpp
|
||||
ir3_compiler_SOURCES = \
|
||||
ir3/ir3_cmdline.c
|
||||
|
||||
@@ -29,7 +31,6 @@ ir3_compiler_LDADD = \
|
||||
../../auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/glsl/libnir.la \
|
||||
$(top_builddir)/src/libglsl_util.la \
|
||||
-lstdc++ \
|
||||
$(top_builddir)/src/util/libmesautil.la \
|
||||
$(GALLIUM_COMMON_LIB_DEPS) \
|
||||
$(FREEDRENO_LIBS)
|
||||
|
@@ -413,12 +413,15 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit,
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: Figure out if there's a way to make it spit out 0's and
|
||||
* 1's for the .z and .w components.
|
||||
/* Replace the .xy coordinates with S/T from the point sprite. Set
|
||||
* interpolation bits for .zw such that they become .01
|
||||
*/
|
||||
if (emit->sprite_coord_enable & (1 << sem2idx(fp->inputs[j].semantic)))
|
||||
if (emit->sprite_coord_enable & (1 << sem2idx(fp->inputs[j].semantic))) {
|
||||
vpsrepl[inloc / 16] |= (emit->sprite_coord_mode ? 0x0d : 0x09)
|
||||
<< ((inloc % 16) * 2);
|
||||
vinterp[(inloc + 2) / 16] |= 2 << (((inloc + 2) % 16) * 2);
|
||||
vinterp[(inloc + 3) / 16] |= 3 << (((inloc + 3) % 16) * 2);
|
||||
}
|
||||
}
|
||||
|
||||
OUT_PKT0(ring, REG_A3XX_VPC_ATTR, 2);
|
||||
|
@@ -360,11 +360,3 @@ int main(int argc, char **argv)
|
||||
}
|
||||
dump_info(&v, info);
|
||||
}
|
||||
|
||||
void _mesa_error_no_memory(const char *caller);
|
||||
|
||||
void
|
||||
_mesa_error_no_memory(const char *caller)
|
||||
{
|
||||
fprintf(stderr, "Mesa error: out of memory in %s", caller);
|
||||
}
|
||||
|
@@ -1615,7 +1615,7 @@ trans_samp(const struct instr_translater *t,
|
||||
instr->cat1.src_type = type_mov;
|
||||
instr->cat1.dst_type = type_mov;
|
||||
add_dst_reg(ctx, instr, &tmp_dst, i);
|
||||
add_src_reg(ctx, instr, &zero, 0);
|
||||
add_src_reg(ctx, instr, &zero, zero.SwizzleX);
|
||||
i++;
|
||||
}
|
||||
if (tgt->array) {
|
||||
@@ -1669,15 +1669,18 @@ trans_samp(const struct instr_translater *t,
|
||||
*/
|
||||
if (inst->Instruction.Opcode == TGSI_OPCODE_TXD) {
|
||||
while (collect->regs_count < 5)
|
||||
ssa_src(ctx, ir3_reg_create(collect, 0, IR3_REG_SSA), &zero, 0);
|
||||
ssa_src(ctx, ir3_reg_create(collect, 0, IR3_REG_SSA),
|
||||
&zero, zero.SwizzleX);
|
||||
for (i = 0; i < tgt->dims; i++)
|
||||
ssa_src(ctx, ir3_reg_create(collect, 0, IR3_REG_SSA), dpdx, i);
|
||||
if (tgt->dims < 2)
|
||||
ssa_src(ctx, ir3_reg_create(collect, 0, IR3_REG_SSA), &zero, 0);
|
||||
ssa_src(ctx, ir3_reg_create(collect, 0, IR3_REG_SSA),
|
||||
&zero, zero.SwizzleX);
|
||||
for (i = 0; i < tgt->dims; i++)
|
||||
ssa_src(ctx, ir3_reg_create(collect, 0, IR3_REG_SSA), dpdy, i);
|
||||
if (tgt->dims < 2)
|
||||
ssa_src(ctx, ir3_reg_create(collect, 0, IR3_REG_SSA), &zero, 0);
|
||||
ssa_src(ctx, ir3_reg_create(collect, 0, IR3_REG_SSA),
|
||||
&zero, zero.SwizzleX);
|
||||
tinf.src_wrmask |= ((1 << (2 * MAX2(tgt->dims, 2))) - 1) << 4;
|
||||
}
|
||||
|
||||
@@ -1700,7 +1703,8 @@ trans_samp(const struct instr_translater *t,
|
||||
ssa_src(ctx, ir3_reg_create(collect, 0, IR3_REG_SSA),
|
||||
offset, i);
|
||||
if (tgt->dims < 2)
|
||||
ssa_src(ctx, ir3_reg_create(collect, 0, IR3_REG_SSA), &zero, 0);
|
||||
ssa_src(ctx, ir3_reg_create(collect, 0, IR3_REG_SSA),
|
||||
&zero, zero.SwizzleX);
|
||||
}
|
||||
if (inst->Instruction.Opcode == TGSI_OPCODE_TXB2)
|
||||
ssa_src(ctx, ir3_reg_create(collect, 0, IR3_REG_SSA),
|
||||
|
@@ -315,7 +315,7 @@ llvmpipe_check_render_cond(struct llvmpipe_context *lp)
|
||||
|
||||
b = pipe->get_query_result(pipe, lp->render_cond_query, wait, (void*)&result);
|
||||
if (b)
|
||||
return (!result == lp->render_cond_cond);
|
||||
return ((!result) == lp->render_cond_cond);
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -1356,18 +1356,20 @@ Converter::srcToSym(tgsi::Instruction::SrcRegister src, int c)
|
||||
{
|
||||
const int swz = src.getSwizzle(c);
|
||||
|
||||
/* TODO: Use Array ID when it's available for the index */
|
||||
return makeSym(src.getFile(),
|
||||
src.is2D() ? src.getIndex(1) : 0,
|
||||
src.isIndirect(0) ? -1 : src.getIndex(0), swz,
|
||||
src.getIndex(0), swz,
|
||||
src.getIndex(0) * 16 + swz * 4);
|
||||
}
|
||||
|
||||
Symbol *
|
||||
Converter::dstToSym(tgsi::Instruction::DstRegister dst, int c)
|
||||
{
|
||||
/* TODO: Use Array ID when it's available for the index */
|
||||
return makeSym(dst.getFile(),
|
||||
dst.is2D() ? dst.getIndex(1) : 0,
|
||||
dst.isIndirect(0) ? -1 : dst.getIndex(0), c,
|
||||
dst.getIndex(0), c,
|
||||
dst.getIndex(0) * 16 + c * 4);
|
||||
}
|
||||
|
||||
|
@@ -240,6 +240,7 @@ GM107LoweringPass::visit(Instruction *i)
|
||||
Value *ptr = bld.mkOp2v(OP_SHL, TYPE_U32, bld.getSSA(),
|
||||
i->getIndirect(0, 0), bld.mkImm(4));
|
||||
i->setIndirect(0, 0, ptr);
|
||||
i->op = OP_VFETCH;
|
||||
} else {
|
||||
i->op = OP_VFETCH;
|
||||
assert(prog->getType() != Program::TYPE_FRAGMENT); // INTERP
|
||||
|
@@ -100,8 +100,7 @@ void
|
||||
NVC0LegalizeSSA::handleFTZ(Instruction *i)
|
||||
{
|
||||
// Only want to flush float inputs
|
||||
if (i->sType != TYPE_F32)
|
||||
return;
|
||||
assert(i->sType == TYPE_F32);
|
||||
|
||||
// If we're already flushing denorms (and NaN's) to zero, no need for this.
|
||||
if (i->dnz)
|
||||
@@ -129,7 +128,7 @@ NVC0LegalizeSSA::visit(BasicBlock *bb)
|
||||
Instruction *next;
|
||||
for (Instruction *i = bb->getEntry(); i; i = next) {
|
||||
next = i->next;
|
||||
if (i->dType == TYPE_F32) {
|
||||
if (i->sType == TYPE_F32) {
|
||||
if (prog->getType() != Program::TYPE_COMPUTE)
|
||||
handleFTZ(i);
|
||||
continue;
|
||||
@@ -1751,6 +1750,7 @@ NVC0LoweringPass::visit(Instruction *i)
|
||||
Value *ptr = bld.mkOp2v(OP_SHL, TYPE_U32, bld.getSSA(),
|
||||
i->getIndirect(0, 0), bld.mkImm(4));
|
||||
i->setIndirect(0, 0, ptr);
|
||||
i->op = OP_VFETCH;
|
||||
} else {
|
||||
i->op = OP_VFETCH;
|
||||
assert(prog->getType() != Program::TYPE_FRAGMENT); // INTERP
|
||||
|
@@ -236,6 +236,9 @@ LoadPropagation::visit(BasicBlock *bb)
|
||||
if (i->op == OP_CALL) // calls have args as sources, they must be in regs
|
||||
continue;
|
||||
|
||||
if (i->op == OP_PFETCH) // pfetch expects arg1 to be a reg
|
||||
continue;
|
||||
|
||||
if (i->srcExists(1))
|
||||
checkSwapSrc01(i);
|
||||
|
||||
@@ -574,6 +577,11 @@ ConstantFolding::expr(Instruction *i,
|
||||
case OP_POPCNT:
|
||||
res.data.u32 = util_bitcount(a->data.u32 & b->data.u32);
|
||||
break;
|
||||
case OP_PFETCH:
|
||||
// The two arguments to pfetch are logically added together. Normally
|
||||
// the second argument will not be constant, but that can happen.
|
||||
res.data.u32 = a->data.u32 + b->data.u32;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@@ -588,7 +596,9 @@ ConstantFolding::expr(Instruction *i,
|
||||
|
||||
i->getSrc(0)->reg.data = res.data;
|
||||
|
||||
if (i->op == OP_MAD || i->op == OP_FMA) {
|
||||
switch (i->op) {
|
||||
case OP_MAD:
|
||||
case OP_FMA: {
|
||||
i->op = OP_ADD;
|
||||
|
||||
i->setSrc(1, i->getSrc(0));
|
||||
@@ -603,8 +613,14 @@ ConstantFolding::expr(Instruction *i,
|
||||
bld.setPosition(i, false);
|
||||
i->setSrc(1, bld.loadImm(NULL, res.data.u32));
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
case OP_PFETCH:
|
||||
// Leave PFETCH alone... we just folded its 2 args into 1.
|
||||
break;
|
||||
default:
|
||||
i->op = i->saturate ? OP_SAT : OP_MOV; /* SAT handled by unary() */
|
||||
break;
|
||||
}
|
||||
i->subOp = 0;
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ nv30_clear(struct pipe_context *pipe, unsigned buffers,
|
||||
struct pipe_framebuffer_state *fb = &nv30->framebuffer;
|
||||
uint32_t colr = 0, zeta = 0, mode = 0;
|
||||
|
||||
if (!nv30_state_validate(nv30, TRUE))
|
||||
if (!nv30_state_validate(nv30, NV30_NEW_FRAMEBUFFER | NV30_NEW_SCISSOR, TRUE))
|
||||
return;
|
||||
|
||||
if (buffers & PIPE_CLEAR_COLOR && fb->nr_cbufs) {
|
||||
|
@@ -204,7 +204,7 @@ void
|
||||
nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info);
|
||||
|
||||
boolean
|
||||
nv30_state_validate(struct nv30_context *nv30, boolean hwtnl);
|
||||
nv30_state_validate(struct nv30_context *nv30, uint32_t mask, boolean hwtnl);
|
||||
|
||||
void
|
||||
nv30_state_release(struct nv30_context *nv30);
|
||||
|
@@ -71,12 +71,12 @@ nv30_render_allocate_vertices(struct vbuf_render *render,
|
||||
struct nv30_render *r = nv30_render(render);
|
||||
struct nv30_context *nv30 = r->nv30;
|
||||
|
||||
r->length = vertex_size * nr_vertices;
|
||||
r->length = (uint32_t)vertex_size * (uint32_t)nr_vertices;
|
||||
|
||||
if (r->offset + r->length >= render->max_vertex_buffer_bytes) {
|
||||
pipe_resource_reference(&r->buffer, NULL);
|
||||
r->buffer = pipe_buffer_create(&nv30->screen->base.base,
|
||||
PIPE_BIND_VERTEX_BUFFER, 0,
|
||||
PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_STREAM,
|
||||
render->max_vertex_buffer_bytes);
|
||||
if (!r->buffer)
|
||||
return FALSE;
|
||||
@@ -91,10 +91,14 @@ static void *
|
||||
nv30_render_map_vertices(struct vbuf_render *render)
|
||||
{
|
||||
struct nv30_render *r = nv30_render(render);
|
||||
char *map = pipe_buffer_map(&r->nv30->base.pipe, r->buffer,
|
||||
PIPE_TRANSFER_WRITE |
|
||||
PIPE_TRANSFER_UNSYNCHRONIZED, &r->transfer);
|
||||
return map + r->offset;
|
||||
char *map = pipe_buffer_map_range(
|
||||
&r->nv30->base.pipe, r->buffer,
|
||||
r->offset, r->length,
|
||||
PIPE_TRANSFER_WRITE |
|
||||
PIPE_TRANSFER_DISCARD_RANGE,
|
||||
&r->transfer);
|
||||
assert(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -103,6 +107,7 @@ nv30_render_unmap_vertices(struct vbuf_render *render,
|
||||
{
|
||||
struct nv30_render *r = nv30_render(render);
|
||||
pipe_buffer_unmap(&r->nv30->base.pipe, r->transfer);
|
||||
r->transfer = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -126,10 +131,10 @@ nv30_render_draw_elements(struct vbuf_render *render,
|
||||
for (i = 0; i < r->vertex_info.num_attribs; i++) {
|
||||
PUSH_RESRC(push, NV30_3D(VTXBUF(i)), BUFCTX_VTXTMP,
|
||||
nv04_resource(r->buffer), r->offset + r->vtxptr[i],
|
||||
NOUVEAU_BO_LOW | NOUVEAU_BO_RD, 0, 0);
|
||||
NOUVEAU_BO_LOW | NOUVEAU_BO_RD, 0, NV30_3D_VTXBUF_DMA1);
|
||||
}
|
||||
|
||||
if (!nv30_state_validate(nv30, FALSE))
|
||||
if (!nv30_state_validate(nv30, ~0, FALSE))
|
||||
return;
|
||||
|
||||
BEGIN_NV04(push, NV30_3D(VERTEX_BEGIN_END), 1);
|
||||
@@ -171,10 +176,10 @@ nv30_render_draw_arrays(struct vbuf_render *render, unsigned start, uint nr)
|
||||
for (i = 0; i < r->vertex_info.num_attribs; i++) {
|
||||
PUSH_RESRC(push, NV30_3D(VTXBUF(i)), BUFCTX_VTXTMP,
|
||||
nv04_resource(r->buffer), r->offset + r->vtxptr[i],
|
||||
NOUVEAU_BO_LOW | NOUVEAU_BO_RD, 0, 0);
|
||||
NOUVEAU_BO_LOW | NOUVEAU_BO_RD, 0, NV30_3D_VTXBUF_DMA1);
|
||||
}
|
||||
|
||||
if (!nv30_state_validate(nv30, FALSE))
|
||||
if (!nv30_state_validate(nv30, ~0, FALSE))
|
||||
return;
|
||||
|
||||
BEGIN_NV04(push, NV30_3D(VERTEX_BEGIN_END), 1);
|
||||
@@ -213,22 +218,24 @@ static const struct {
|
||||
[TGSI_SEMANTIC_BCOLOR ] = { EMIT_4F, INTERP_LINEAR , 1, 3, 0x00000004 },
|
||||
[TGSI_SEMANTIC_FOG ] = { EMIT_4F, INTERP_PERSPECTIVE, 5, 5, 0x00000010 },
|
||||
[TGSI_SEMANTIC_PSIZE ] = { EMIT_1F_PSIZE, INTERP_POS , 6, 6, 0x00000020 },
|
||||
[TGSI_SEMANTIC_GENERIC ] = { EMIT_4F, INTERP_PERSPECTIVE, 8, 7, 0x00004000 }
|
||||
[TGSI_SEMANTIC_TEXCOORD] = { EMIT_4F, INTERP_PERSPECTIVE, 8, 7, 0x00004000 },
|
||||
};
|
||||
|
||||
static boolean
|
||||
vroute_add(struct nv30_render *r, uint attrib, uint sem, uint *idx)
|
||||
{
|
||||
struct pipe_screen *pscreen = &r->nv30->screen->base.base;
|
||||
struct nv30_screen *screen = r->nv30->screen;
|
||||
struct nv30_fragprog *fp = r->nv30->fragprog.program;
|
||||
struct vertex_info *vinfo = &r->vertex_info;
|
||||
enum pipe_format format;
|
||||
uint emit = EMIT_OMIT;
|
||||
uint result = *idx;
|
||||
|
||||
if (sem == TGSI_SEMANTIC_GENERIC && result >= 8) {
|
||||
for (result = 0; result < 8; result++) {
|
||||
if (fp->texcoord[result] == *idx) {
|
||||
if (sem == TGSI_SEMANTIC_GENERIC) {
|
||||
uint num_texcoords = (screen->eng3d->oclass < NV40_3D_CLASS) ? 8 : 10;
|
||||
for (result = 0; result < num_texcoords; result++) {
|
||||
if (fp->texcoord[result] == *idx + 8) {
|
||||
sem = TGSI_SEMANTIC_TEXCOORD;
|
||||
emit = vroute[sem].emit;
|
||||
break;
|
||||
}
|
||||
@@ -243,11 +250,11 @@ vroute_add(struct nv30_render *r, uint attrib, uint sem, uint *idx)
|
||||
draw_emit_vertex_attr(vinfo, emit, vroute[sem].interp, attrib);
|
||||
format = draw_translate_vinfo_format(emit);
|
||||
|
||||
r->vtxfmt[attrib] = nv30_vtxfmt(pscreen, format)->hw;
|
||||
r->vtxptr[attrib] = vinfo->size | NV30_3D_VTXBUF_DMA1;
|
||||
r->vtxfmt[attrib] = nv30_vtxfmt(&screen->base.base, format)->hw;
|
||||
r->vtxptr[attrib] = vinfo->size;
|
||||
vinfo->size += draw_translate_vinfo_size(emit);
|
||||
|
||||
if (nv30_screen(pscreen)->eng3d->oclass < NV40_3D_CLASS) {
|
||||
if (screen->eng3d->oclass < NV40_3D_CLASS) {
|
||||
r->vtxprog[attrib][0] = 0x001f38d8;
|
||||
r->vtxprog[attrib][1] = 0x0080001b | (attrib << 9);
|
||||
r->vtxprog[attrib][2] = 0x0836106c;
|
||||
@@ -259,7 +266,12 @@ vroute_add(struct nv30_render *r, uint attrib, uint sem, uint *idx)
|
||||
r->vtxprog[attrib][3] = 0x6041ff80 | (result + vroute[sem].vp40) << 2;
|
||||
}
|
||||
|
||||
*idx = vroute[sem].ow40 << result;
|
||||
if (result < 8)
|
||||
*idx = vroute[sem].ow40 << result;
|
||||
else {
|
||||
assert(sem == TGSI_SEMANTIC_TEXCOORD);
|
||||
*idx = 0x00001000 << (result - 8);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -313,7 +325,7 @@ nv30_render_validate(struct nv30_context *nv30)
|
||||
|
||||
while (pntc && attrib < 16) {
|
||||
uint index = ffs(pntc) - 1; pntc &= ~(1 << index);
|
||||
if (vroute_add(r, attrib, TGSI_SEMANTIC_GENERIC, &index)) {
|
||||
if (vroute_add(r, attrib, TGSI_SEMANTIC_TEXCOORD, &index)) {
|
||||
vp_attribs |= (1 << attrib++);
|
||||
vp_results |= index;
|
||||
}
|
||||
@@ -398,17 +410,17 @@ nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
if (nv30->vertprog.constbuf) {
|
||||
void *map = nv04_resource(nv30->vertprog.constbuf)->data;
|
||||
draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0,
|
||||
map, nv30->vertprog.constbuf_nr);
|
||||
map, nv30->vertprog.constbuf_nr * 16);
|
||||
} else {
|
||||
draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < nv30->num_vtxbufs; i++) {
|
||||
const void *map = nv30->vtxbuf[i].user_buffer;
|
||||
if (!map) {
|
||||
if (!nv30->vtxbuf[i].buffer) {
|
||||
continue;
|
||||
}
|
||||
map = pipe_buffer_map(pipe, nv30->vtxbuf[i].buffer,
|
||||
if (nv30->vtxbuf[i].buffer)
|
||||
map = pipe_buffer_map(pipe, nv30->vtxbuf[i].buffer,
|
||||
PIPE_TRANSFER_UNSYNCHRONIZED |
|
||||
PIPE_TRANSFER_READ, &transfer[i]);
|
||||
}
|
||||
@@ -418,9 +430,9 @@ nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
if (info->indexed) {
|
||||
const void *map = nv30->idxbuf.user_buffer;
|
||||
if (!map)
|
||||
pipe_buffer_map(pipe, nv30->idxbuf.buffer,
|
||||
PIPE_TRANSFER_UNSYNCHRONIZED |
|
||||
PIPE_TRANSFER_READ, &transferi);
|
||||
map = pipe_buffer_map(pipe, nv30->idxbuf.buffer,
|
||||
PIPE_TRANSFER_UNSYNCHRONIZED |
|
||||
PIPE_TRANSFER_READ, &transferi);
|
||||
draw_set_indexes(draw,
|
||||
(ubyte *) map + nv30->idxbuf.offset,
|
||||
nv30->idxbuf.index_size, ~0);
|
||||
@@ -444,6 +456,12 @@ nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
static void
|
||||
nv30_render_destroy(struct vbuf_render *render)
|
||||
{
|
||||
struct nv30_render *r = nv30_render(render);
|
||||
|
||||
if (r->transfer)
|
||||
pipe_buffer_unmap(&r->nv30->base.pipe, r->transfer);
|
||||
pipe_resource_reference(&r->buffer, NULL);
|
||||
nouveau_heap_free(&r->vertprog);
|
||||
FREE(render);
|
||||
}
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "draw/draw_context.h"
|
||||
#include "tgsi/tgsi_parse.h"
|
||||
|
||||
#include "nv_object.xml.h"
|
||||
@@ -147,8 +148,12 @@ nv30_fp_state_delete(struct pipe_context *pipe, void *hwcso)
|
||||
|
||||
pipe_resource_reference(&fp->buffer, NULL);
|
||||
|
||||
if (fp->draw)
|
||||
draw_delete_fragment_shader(nv30_context(pipe)->draw, fp->draw);
|
||||
|
||||
FREE((void *)fp->pipe.tokens);
|
||||
FREE(fp->insn);
|
||||
FREE(fp->consts);
|
||||
FREE(fp);
|
||||
}
|
||||
|
||||
|
@@ -272,15 +272,13 @@ nv30_validate_clip(struct nv30_context *nv30)
|
||||
uint32_t clpd_enable = 0;
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
if (nv30->rast->pipe.clip_plane_enable & (1 << i)) {
|
||||
if (nv30->dirty & NV30_NEW_CLIP) {
|
||||
BEGIN_NV04(push, NV30_3D(VP_UPLOAD_CONST_ID), 5);
|
||||
PUSH_DATA (push, i);
|
||||
PUSH_DATAp(push, nv30->clip.ucp[i], 4);
|
||||
}
|
||||
|
||||
clpd_enable |= 1 << (1 + 4*i);
|
||||
if (nv30->dirty & NV30_NEW_CLIP) {
|
||||
BEGIN_NV04(push, NV30_3D(VP_UPLOAD_CONST_ID), 5);
|
||||
PUSH_DATA (push, i);
|
||||
PUSH_DATAp(push, nv30->clip.ucp[i], 4);
|
||||
}
|
||||
if (nv30->rast->pipe.clip_plane_enable & (1 << i))
|
||||
clpd_enable |= 2 << (4*i);
|
||||
}
|
||||
|
||||
BEGIN_NV04(push, NV30_3D(VP_CLIP_PLANES_ENABLE), 1);
|
||||
@@ -389,7 +387,7 @@ static struct state_validate hwtnl_validate_list[] = {
|
||||
{ nv30_validate_stipple, NV30_NEW_STIPPLE },
|
||||
{ nv30_validate_scissor, NV30_NEW_SCISSOR | NV30_NEW_RASTERIZER },
|
||||
{ nv30_validate_viewport, NV30_NEW_VIEWPORT },
|
||||
{ nv30_validate_clip, NV30_NEW_CLIP },
|
||||
{ nv30_validate_clip, NV30_NEW_CLIP | NV30_NEW_RASTERIZER },
|
||||
{ nv30_fragprog_validate, NV30_NEW_FRAGPROG | NV30_NEW_FRAGCONST },
|
||||
{ nv30_vertprog_validate, NV30_NEW_VERTPROG | NV30_NEW_VERTCONST |
|
||||
NV30_NEW_FRAGPROG | NV30_NEW_RASTERIZER },
|
||||
@@ -456,7 +454,7 @@ nv30_state_context_switch(struct nv30_context *nv30)
|
||||
}
|
||||
|
||||
boolean
|
||||
nv30_state_validate(struct nv30_context *nv30, boolean hwtnl)
|
||||
nv30_state_validate(struct nv30_context *nv30, uint32_t mask, boolean hwtnl)
|
||||
{
|
||||
struct nouveau_screen *screen = &nv30->screen->base;
|
||||
struct nouveau_pushbuf *push = nv30->base.pushbuf;
|
||||
@@ -481,14 +479,16 @@ nv30_state_validate(struct nv30_context *nv30, boolean hwtnl)
|
||||
else
|
||||
validate = swtnl_validate_list;
|
||||
|
||||
if (nv30->dirty) {
|
||||
mask &= nv30->dirty;
|
||||
|
||||
if (mask) {
|
||||
while (validate->func) {
|
||||
if (nv30->dirty & validate->mask)
|
||||
if (mask & validate->mask)
|
||||
validate->func(nv30);
|
||||
validate++;
|
||||
}
|
||||
|
||||
nv30->dirty = 0;
|
||||
nv30->dirty &= ~mask;
|
||||
}
|
||||
|
||||
nouveau_pushbuf_bufctx(push, bctx);
|
||||
|
@@ -564,7 +564,7 @@ nv30_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
if (nv30->vbo_user && !(nv30->dirty & (NV30_NEW_VERTEX | NV30_NEW_ARRAYS)))
|
||||
nv30_update_user_vbufs(nv30);
|
||||
|
||||
nv30_state_validate(nv30, TRUE);
|
||||
nv30_state_validate(nv30, ~0, TRUE);
|
||||
if (nv30->draw_flags) {
|
||||
nv30_render_vbo(pipe, info);
|
||||
return;
|
||||
|
@@ -23,6 +23,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "draw/draw_context.h"
|
||||
#include "util/u_dynarray.h"
|
||||
#include "tgsi/tgsi_parse.h"
|
||||
|
||||
@@ -237,6 +238,10 @@ nv30_vp_state_delete(struct pipe_context *pipe, void *hwcso)
|
||||
|
||||
if (vp->translated)
|
||||
nv30_vertprog_destroy(vp);
|
||||
|
||||
if (vp->draw)
|
||||
draw_delete_vertex_shader(nv30_context(pipe)->draw, vp->draw);
|
||||
|
||||
FREE((void *)vp->pipe.tokens);
|
||||
FREE(vp);
|
||||
}
|
||||
|
@@ -872,9 +872,8 @@ nvfx_vertprog_parse_decl_output(struct nvfx_vpc *vpc,
|
||||
}
|
||||
break;
|
||||
case TGSI_SEMANTIC_EDGEFLAG:
|
||||
/* not really an error just a fallback */
|
||||
NOUVEAU_ERR("cannot handle edgeflag output\n");
|
||||
return FALSE;
|
||||
vpc->r_result[idx] = nvfx_reg(NVFXSR_NONE, 0);
|
||||
return TRUE;
|
||||
default:
|
||||
NOUVEAU_ERR("bad output semantic\n");
|
||||
return FALSE;
|
||||
|
@@ -419,7 +419,7 @@ nv50_miptree_from_handle(struct pipe_screen *pscreen,
|
||||
FREE(mt);
|
||||
return NULL;
|
||||
}
|
||||
mt->base.domain = NOUVEAU_BO_VRAM;
|
||||
mt->base.domain = mt->base.bo->flags & NOUVEAU_BO_APER;
|
||||
mt->base.address = mt->base.bo->offset;
|
||||
|
||||
mt->base.base = *templ;
|
||||
|
@@ -392,7 +392,7 @@ nvc0_gp_gen_header(struct nvc0_program *gp, struct nv50_ir_prog_info *info)
|
||||
break;
|
||||
}
|
||||
|
||||
gp->hdr[4] = info->prop.gp.maxVertices & 0x1ff;
|
||||
gp->hdr[4] = MIN2(info->prop.gp.maxVertices, 1024);
|
||||
|
||||
return nvc0_vtgp_gen_header(gp, info);
|
||||
}
|
||||
|
@@ -835,8 +835,15 @@ static void si_update_spi_tmpring_size(struct si_context *sctx)
|
||||
si_pm4_bind_state(sctx, ps, sctx->ps_shader->current->pm4);
|
||||
if (si_update_scratch_buffer(sctx, sctx->gs_shader))
|
||||
si_pm4_bind_state(sctx, gs, sctx->gs_shader->current->pm4);
|
||||
if (si_update_scratch_buffer(sctx, sctx->vs_shader))
|
||||
si_pm4_bind_state(sctx, vs, sctx->vs_shader->current->pm4);
|
||||
|
||||
/* VS can be bound as ES or VS. */
|
||||
if (sctx->gs_shader) {
|
||||
if (si_update_scratch_buffer(sctx, sctx->vs_shader))
|
||||
si_pm4_bind_state(sctx, es, sctx->vs_shader->current->pm4);
|
||||
} else {
|
||||
if (si_update_scratch_buffer(sctx, sctx->vs_shader))
|
||||
si_pm4_bind_state(sctx, vs, sctx->vs_shader->current->pm4);
|
||||
}
|
||||
}
|
||||
|
||||
/* The LLVM shader backend should be reporting aligned scratch_sizes. */
|
||||
|
@@ -31,7 +31,12 @@ extern "C" {
|
||||
PUBLIC bool
|
||||
opencl_dri_event_add_ref(cl_event event)
|
||||
{
|
||||
return clRetainEvent(event) == CL_SUCCESS;
|
||||
/* This should fail if the event hasn't been created by
|
||||
* clEnqueueReleaseGLObjects or clEnqueueReleaseEGLObjects.
|
||||
*
|
||||
* TODO: implement the CL functions
|
||||
*/
|
||||
return false; /*return clRetainEvent(event) == CL_SUCCESS;*/
|
||||
}
|
||||
|
||||
PUBLIC bool
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include "CL/cl.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
namespace clover {
|
||||
class command_queue;
|
||||
|
@@ -1483,7 +1483,7 @@ dri2_init_screen(__DRIscreen * sPriv)
|
||||
}
|
||||
}
|
||||
|
||||
if (pscreen->get_param(pscreen, PIPE_CAP_DEVICE_RESET_STATUS_QUERY)) {
|
||||
if (pscreen && pscreen->get_param(pscreen, PIPE_CAP_DEVICE_RESET_STATUS_QUERY)) {
|
||||
sPriv->extensions = dri_robust_screen_extensions;
|
||||
screen->has_reset_status_query = true;
|
||||
}
|
||||
|
@@ -244,11 +244,10 @@ dri_make_current(__DRIcontext * cPriv,
|
||||
|
||||
ctx->stapi->make_current(ctx->stapi, ctx->st, &draw->base, &read->base);
|
||||
|
||||
// This is ok to call here. If they are already init, it's a no-op.
|
||||
if (draw->textures[ST_ATTACHMENT_BACK_LEFT] && draw->textures[ST_ATTACHMENT_DEPTH_STENCIL]
|
||||
&& ctx->pp)
|
||||
pp_init_fbos(ctx->pp, draw->textures[ST_ATTACHMENT_BACK_LEFT]->width0,
|
||||
draw->textures[ST_ATTACHMENT_BACK_LEFT]->height0);
|
||||
/* This is ok to call here. If they are already init, it's a no-op. */
|
||||
if (ctx->pp && draw->textures[ST_ATTACHMENT_BACK_LEFT])
|
||||
pp_init_fbos(ctx->pp, draw->textures[ST_ATTACHMENT_BACK_LEFT]->width0,
|
||||
draw->textures[ST_ATTACHMENT_BACK_LEFT]->height0);
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
@@ -535,15 +535,3 @@ xa_surface_format(const struct xa_surface *srf)
|
||||
{
|
||||
return srf->fdesc.xa_format;
|
||||
}
|
||||
|
||||
/*
|
||||
* _mesa_error_no_memory() is expected by NIR to be provided by the
|
||||
* user. Normally this is in mesa st, but other state trackers
|
||||
* must provide their own.
|
||||
*/
|
||||
void _mesa_error_no_memory(const char *caller);
|
||||
void
|
||||
_mesa_error_no_memory(const char *caller)
|
||||
{
|
||||
debug_printf("Mesa error: out of memory in %s", caller);
|
||||
}
|
||||
|
@@ -74,6 +74,8 @@ endif # HAVE_LD_VERSION_SCRIPT
|
||||
d3dadapter9_la_LIBADD = \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgalliumvl_stub.la \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/glsl/libnir.la \
|
||||
$(top_builddir)/src/libglsl_util.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/nine/libninetracker.la \
|
||||
$(top_builddir)/src/util/libmesautil.la \
|
||||
$(top_builddir)/src/gallium/winsys/sw/wrapper/libwsw.la \
|
||||
|
@@ -53,12 +53,6 @@ gallium_dri_la_LIBADD = \
|
||||
$(LIBDRM_LIBS) \
|
||||
$(GALLIUM_COMMON_LIB_DEPS)
|
||||
|
||||
# XXX: Temporary allow duplicated symbols, as the loader pulls in xmlconfig.c
|
||||
# which already provides driParse* and driQuery* amongst others.
|
||||
# Remove this hack as we come up with a cleaner solution.
|
||||
gallium_dri_la_LDFLAGS += \
|
||||
-Wl,--allow-multiple-definition
|
||||
|
||||
EXTRA_gallium_dri_la_DEPENDENCIES = \
|
||||
dri.sym \
|
||||
$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn
|
||||
|
@@ -42,7 +42,6 @@ nodist_EXTRA_lib@OSMESA_LIB@_la_SOURCES = dummy.cpp
|
||||
lib@OSMESA_LIB@_la_SOURCES = target.c
|
||||
|
||||
lib@OSMESA_LIB@_la_LDFLAGS = \
|
||||
-module \
|
||||
-no-undefined \
|
||||
-version-number @OSMESA_VERSION@ \
|
||||
$(GC_SECTIONS) \
|
||||
|
@@ -52,6 +52,8 @@ endif
|
||||
|
||||
PIPE_LIBS += \
|
||||
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
|
||||
$(top_builddir)/src/glsl/libnir.la \
|
||||
$(top_builddir)/src/libglsl_util.la \
|
||||
$(top_builddir)/src/util/libmesautil.la \
|
||||
$(top_builddir)/src/gallium/drivers/rbug/librbug.la \
|
||||
$(top_builddir)/src/gallium/drivers/trace/libtrace.la \
|
||||
|
@@ -89,8 +89,7 @@ tests_general_ir_test_SOURCES = \
|
||||
tests/builtin_variable_test.cpp \
|
||||
tests/invalidate_locations_test.cpp \
|
||||
tests/general_ir_test.cpp \
|
||||
tests/varyings_test.cpp \
|
||||
tests/common.c
|
||||
tests/varyings_test.cpp
|
||||
tests_general_ir_test_CFLAGS = \
|
||||
$(PTHREAD_CFLAGS)
|
||||
tests_general_ir_test_LDADD = \
|
||||
@@ -103,8 +102,7 @@ tests_uniform_initializer_test_SOURCES = \
|
||||
tests/copy_constant_to_storage_tests.cpp \
|
||||
tests/set_uniform_initializer_tests.cpp \
|
||||
tests/uniform_initializer_utils.cpp \
|
||||
tests/uniform_initializer_utils.h \
|
||||
tests/common.c
|
||||
tests/uniform_initializer_utils.h
|
||||
tests_uniform_initializer_test_CFLAGS = \
|
||||
$(PTHREAD_CFLAGS)
|
||||
tests_uniform_initializer_test_LDADD = \
|
||||
@@ -114,8 +112,7 @@ tests_uniform_initializer_test_LDADD = \
|
||||
$(PTHREAD_LIBS)
|
||||
|
||||
tests_sampler_types_test_SOURCES = \
|
||||
tests/sampler_types_test.cpp \
|
||||
tests/common.c
|
||||
tests/sampler_types_test.cpp
|
||||
tests_sampler_types_test_CFLAGS = \
|
||||
$(PTHREAD_CFLAGS)
|
||||
tests_sampler_types_test_LDADD = \
|
||||
@@ -133,8 +130,7 @@ libglcpp_la_SOURCES = \
|
||||
$(LIBGLCPP_FILES)
|
||||
|
||||
glcpp_glcpp_SOURCES = \
|
||||
glcpp/glcpp.c \
|
||||
tests/common.c
|
||||
glcpp/glcpp.c
|
||||
glcpp_glcpp_LDADD = \
|
||||
libglcpp.la \
|
||||
$(top_builddir)/src/libglsl_util.la \
|
||||
@@ -164,7 +160,6 @@ glsl_compiler_LDADD = \
|
||||
|
||||
glsl_test_SOURCES = \
|
||||
standalone_scaffolding.cpp \
|
||||
tests/common.c \
|
||||
test.cpp \
|
||||
test_optpass.cpp \
|
||||
test_optpass.h
|
||||
|
@@ -71,6 +71,7 @@ env.Command('imports.c', '#src/mesa/main/imports.c', Copy('$TARGET', '$SOURCE'))
|
||||
env.Prepend(CPPPATH = ['#src/mesa/program'])
|
||||
env.Command('prog_hash_table.c', '#src/mesa/program/prog_hash_table.c', Copy('$TARGET', '$SOURCE'))
|
||||
env.Command('symbol_table.c', '#src/mesa/program/symbol_table.c', Copy('$TARGET', '$SOURCE'))
|
||||
env.Command('dummy_errors.c', '#src/mesa/program/dummy_errors.c', Copy('$TARGET', '$SOURCE'))
|
||||
|
||||
compiler_objs = env.StaticObject(source_lists['GLSL_COMPILER_CXX_FILES'])
|
||||
|
||||
@@ -78,6 +79,7 @@ mesa_objs = env.StaticObject([
|
||||
'imports.c',
|
||||
'prog_hash_table.c',
|
||||
'symbol_table.c',
|
||||
'dummy_errors.c',
|
||||
])
|
||||
|
||||
compiler_objs += mesa_objs
|
||||
@@ -115,6 +117,6 @@ env.Alias('glsl_compiler', glsl_compiler)
|
||||
|
||||
glcpp = env.Program(
|
||||
target = 'glcpp/glcpp',
|
||||
source = ['glcpp/glcpp.c', 'tests/common.c'] + mesa_objs,
|
||||
source = ['glcpp/glcpp.c'] + mesa_objs,
|
||||
)
|
||||
env.Alias('glcpp', glcpp)
|
||||
|
@@ -2829,8 +2829,11 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
link_intrastage_shaders(mem_ctx, ctx, prog, shader_list[stage],
|
||||
num_shaders[stage]);
|
||||
|
||||
if (!prog->LinkStatus)
|
||||
if (!prog->LinkStatus) {
|
||||
if (sh)
|
||||
ctx->Driver.DeleteShader(ctx, sh);
|
||||
goto done;
|
||||
}
|
||||
|
||||
switch (stage) {
|
||||
case MESA_SHADER_VERTEX:
|
||||
@@ -2843,8 +2846,11 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
validate_fragment_shader_executable(prog, sh);
|
||||
break;
|
||||
}
|
||||
if (!prog->LinkStatus)
|
||||
if (!prog->LinkStatus) {
|
||||
if (sh)
|
||||
ctx->Driver.DeleteShader(ctx, sh);
|
||||
goto done;
|
||||
}
|
||||
|
||||
_mesa_reference_shader(ctx, &prog->_LinkedShaders[stage], sh);
|
||||
}
|
||||
|
@@ -41,12 +41,6 @@
|
||||
|
||||
static int glsl_version = 330;
|
||||
|
||||
extern "C" void
|
||||
_mesa_error_no_memory(const char *caller)
|
||||
{
|
||||
fprintf(stderr, "Mesa error: out of memory in %s", caller);
|
||||
}
|
||||
|
||||
static void
|
||||
initialize_context(struct gl_context *ctx, gl_api api)
|
||||
{
|
||||
|
@@ -41,15 +41,11 @@ libloader_la_CPPFLAGS += \
|
||||
-I$(top_builddir)/src/mesa/drivers/dri/common/ \
|
||||
-I$(top_srcdir)/src/mesa/ \
|
||||
-I$(top_srcdir)/src/mapi/ \
|
||||
-DUSE_DRICONF \
|
||||
$(EXPAT_CFLAGS)
|
||||
-DUSE_DRICONF
|
||||
|
||||
libloader_la_SOURCES += \
|
||||
$(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c
|
||||
libloader_la_LIBADD += \
|
||||
$(top_builddir)/src/mesa/drivers/dri/common/libxmlconfig.la
|
||||
|
||||
libloader_la_LIBADD += \
|
||||
-lm \
|
||||
$(EXPAT_LIBS)
|
||||
endif
|
||||
|
||||
if !HAVE_LIBDRM
|
||||
|
@@ -61,6 +61,7 @@ EXTRA_DIST= \
|
||||
$(MESA_GLAPI_DIR)/glapi_x86-64.S \
|
||||
$(MESA_GLAPI_DIR)/glapi_sparc.S \
|
||||
$(COMMON_GLX) \
|
||||
apiexec.py \
|
||||
gl_apitemp.py \
|
||||
gl_enums.py \
|
||||
gl_genexec.py \
|
||||
@@ -267,7 +268,7 @@ $(MESA_GLAPI_DIR)/glapi_sparc.S: gl_SPARC_asm.py $(COMMON)
|
||||
$(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON)
|
||||
$(PYTHON_GEN) $< -f $(srcdir)/gl_and_es_API.xml > $@
|
||||
|
||||
$(MESA_DIR)/main/api_exec.c: gl_genexec.py $(COMMON)
|
||||
$(MESA_DIR)/main/api_exec.c: gl_genexec.py apiexec.py $(COMMON)
|
||||
$(PYTHON_GEN) $< -f $(srcdir)/gl_and_es_API.xml > $@
|
||||
|
||||
$(MESA_DIR)/main/dispatch.h: gl_table.py $(COMMON)
|
||||
|
240
src/mapi/glapi/gen/apiexec.py
Normal file
240
src/mapi/glapi/gen/apiexec.py
Normal file
@@ -0,0 +1,240 @@
|
||||
# Copyright (C) 2015 Intel Corporation
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the next
|
||||
# paragraph) shall be included in all copies or substantial portions of the
|
||||
# Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
class exec_info():
|
||||
"""Information relating GL APIs to a function.
|
||||
|
||||
Each of the four attributes of this class, compatibility, core, es1, and
|
||||
es2, specify the minimum API version where a function can possibly exist
|
||||
in Mesa. The version is specified as an integer of (real GL version *
|
||||
10). For example, glCreateProgram was added in OpenGL 2.0, so
|
||||
compatibility=20 and core=31.
|
||||
|
||||
If the attribute is None, then it cannot be supported by that
|
||||
API. For example, glNewList was removed from core profiles, so
|
||||
compatibility=10 and core=None.
|
||||
|
||||
Each of the attributes that is not None must have a valid value. The
|
||||
valid ranges are:
|
||||
|
||||
compatiblity: [10, 30]
|
||||
core: [31, )
|
||||
es1: [10, 11]
|
||||
es2: [20, )
|
||||
|
||||
These ranges are enforced by the constructor.
|
||||
"""
|
||||
def __init__(self, compatibility=None, core=None, es1=None, es2=None):
|
||||
if compatibility is not None:
|
||||
assert isinstance(compatibility, int)
|
||||
assert compatibility >= 10
|
||||
assert compatibility <= 30
|
||||
|
||||
if core is not None:
|
||||
assert isinstance(core, int)
|
||||
assert core >= 31
|
||||
|
||||
if es1 is not None:
|
||||
assert isinstance(es1, int)
|
||||
assert es1 == 10 or es1 == 11
|
||||
|
||||
if es2 is not None:
|
||||
assert isinstance(es2, int)
|
||||
assert es2 >= 20
|
||||
|
||||
self.compatibility = compatibility
|
||||
self.core = core
|
||||
self.es1 = es1
|
||||
self.es2 = es2
|
||||
|
||||
functions = {
|
||||
# OpenGL 3.1 / GL_ARB_texture_buffer_object. Mesa only exposes this
|
||||
# extension with core profile.
|
||||
"TexBuffer": exec_info(core=31),
|
||||
|
||||
# OpenGL 3.2 / GL_ARB_geometry_shader4. Mesa does not support
|
||||
# GL_ARB_geometry_shader4, so OpenGL 3.2 is required.
|
||||
"FramebufferTexture": exec_info(core=32),
|
||||
|
||||
# OpenGL 4.0 / GL_ARB_gpu_shader_fp64. The extension spec says:
|
||||
#
|
||||
# "OpenGL 3.2 and GLSL 1.50 are required."
|
||||
"Uniform1d": exec_info(core=32),
|
||||
"Uniform2d": exec_info(core=32),
|
||||
"Uniform3d": exec_info(core=32),
|
||||
"Uniform4d": exec_info(core=32),
|
||||
"Uniform1dv": exec_info(core=32),
|
||||
"Uniform2dv": exec_info(core=32),
|
||||
"Uniform3dv": exec_info(core=32),
|
||||
"Uniform4dv": exec_info(core=32),
|
||||
"UniformMatrix2dv": exec_info(core=32),
|
||||
"UniformMatrix3dv": exec_info(core=32),
|
||||
"UniformMatrix4dv": exec_info(core=32),
|
||||
"UniformMatrix2x3dv": exec_info(core=32),
|
||||
"UniformMatrix2x4dv": exec_info(core=32),
|
||||
"UniformMatrix3x2dv": exec_info(core=32),
|
||||
"UniformMatrix3x4dv": exec_info(core=32),
|
||||
"UniformMatrix4x2dv": exec_info(core=32),
|
||||
"UniformMatrix4x3dv": exec_info(core=32),
|
||||
"GetUniformdv": exec_info(core=32),
|
||||
|
||||
# OpenGL 4.1 / GL_ARB_vertex_attrib_64bit. The extension spec says:
|
||||
#
|
||||
# "OpenGL 3.0 and GLSL 1.30 are required.
|
||||
#
|
||||
# ARB_gpu_shader_fp64 (or equivalent functionality) is required."
|
||||
#
|
||||
# For Mesa this effectively means OpenGL 3.2 is required. It seems
|
||||
# unlikely that Mesa will ever get support for any of the NV extensions
|
||||
# that add "equivalent functionality."
|
||||
"VertexAttribL1d": exec_info(core=32),
|
||||
"VertexAttribL2d": exec_info(core=32),
|
||||
"VertexAttribL3d": exec_info(core=32),
|
||||
"VertexAttribL4d": exec_info(core=32),
|
||||
"VertexAttribL1dv": exec_info(core=32),
|
||||
"VertexAttribL2dv": exec_info(core=32),
|
||||
"VertexAttribL3dv": exec_info(core=32),
|
||||
"VertexAttribL4dv": exec_info(core=32),
|
||||
"VertexAttribLPointer": exec_info(core=32),
|
||||
"GetVertexAttribLdv": exec_info(core=32),
|
||||
|
||||
# OpenGL 4.1 / GL_ARB_viewport_array. The extension spec says:
|
||||
#
|
||||
# "OpenGL 3.2 or the EXT_geometry_shader4 or ARB_geometry_shader4
|
||||
# extensions are required."
|
||||
#
|
||||
# Mesa does not support either of the geometry shader extensions, so
|
||||
# OpenGL 3.2 is required.
|
||||
"ViewportArrayv": exec_info(core=32),
|
||||
"ViewportIndexedf": exec_info(core=32),
|
||||
"ViewportIndexedfv": exec_info(core=32),
|
||||
"ScissorArrayv": exec_info(core=32),
|
||||
"ScissorIndexed": exec_info(core=32),
|
||||
"ScissorIndexedv": exec_info(core=32),
|
||||
"DepthRangeArrayv": exec_info(core=32),
|
||||
"DepthRangeIndexed": exec_info(core=32),
|
||||
# GetFloati_v also GL_ARB_shader_atomic_counters
|
||||
# GetDoublei_v also GL_ARB_shader_atomic_counters
|
||||
|
||||
# OpenGL 4.3 / GL_ARB_texture_buffer_range. Mesa can expose the extension
|
||||
# with OpenGL 3.1.
|
||||
"TexBufferRange": exec_info(core=31),
|
||||
|
||||
# OpenGL 4.5 / GL_ARB_direct_state_access. Mesa can expose the extension
|
||||
# with core profile.
|
||||
"CreateTransformFeedbacks": exec_info(core=31),
|
||||
"TransformFeedbackBufferBase": exec_info(core=31),
|
||||
"TransformFeedbackBufferRange": exec_info(core=31),
|
||||
"GetTransformFeedbackiv": exec_info(core=31),
|
||||
"GetTransformFeedbacki_v": exec_info(core=31),
|
||||
"GetTransformFeedbacki64_v": exec_info(core=31),
|
||||
"CreateBuffers": exec_info(core=31),
|
||||
"NamedBufferStorage": exec_info(core=31),
|
||||
"NamedBufferData": exec_info(core=31),
|
||||
"NamedBufferSubData": exec_info(core=31),
|
||||
"CopyNamedBufferSubData": exec_info(core=31),
|
||||
"ClearNamedBufferData": exec_info(core=31),
|
||||
"ClearNamedBufferSubData": exec_info(core=31),
|
||||
"MapNamedBuffer": exec_info(core=31),
|
||||
"MapNamedBufferRange": exec_info(core=31),
|
||||
"UnmapNamedBuffer": exec_info(core=31),
|
||||
"FlushMappedNamedBufferRange": exec_info(core=31),
|
||||
"GetNamedBufferParameteriv": exec_info(core=31),
|
||||
"GetNamedBufferParameteri64v": exec_info(core=31),
|
||||
"GetNamedBufferPointerv": exec_info(core=31),
|
||||
"GetNamedBufferSubData": exec_info(core=31),
|
||||
"CreateFramebuffers": exec_info(core=31),
|
||||
"NamedFramebufferRenderbuffer": exec_info(core=31),
|
||||
"NamedFramebufferParameteri": exec_info(core=31),
|
||||
"NamedFramebufferTexture": exec_info(core=31),
|
||||
"NamedFramebufferTextureLayer": exec_info(core=31),
|
||||
"NamedFramebufferDrawBuffer": exec_info(core=31),
|
||||
"NamedFramebufferDrawBuffers": exec_info(core=31),
|
||||
"NamedFramebufferReadBuffer": exec_info(core=31),
|
||||
"InvalidateNamedFramebufferData": exec_info(core=31),
|
||||
"InvalidateNamedFramebufferSubData": exec_info(core=31),
|
||||
"ClearNamedFramebufferiv": exec_info(core=31),
|
||||
"ClearNamedFramebufferuiv": exec_info(core=31),
|
||||
"ClearNamedFramebufferfv": exec_info(core=31),
|
||||
"ClearNamedFramebufferfi": exec_info(core=31),
|
||||
"BlitNamedFramebuffer": exec_info(core=31),
|
||||
"CheckNamedFramebufferStatus": exec_info(core=31),
|
||||
"GetNamedFramebufferParameteriv": exec_info(core=31),
|
||||
"GetNamedFramebufferAttachmentParameteriv": exec_info(core=31),
|
||||
"CreateRenderbuffers": exec_info(core=31),
|
||||
"NamedRenderbufferStorage": exec_info(core=31),
|
||||
"NamedRenderbufferStorageMultisample": exec_info(core=31),
|
||||
"GetNamedRenderbufferParameteriv": exec_info(core=31),
|
||||
"CreateTextures": exec_info(core=31),
|
||||
"TextureBuffer": exec_info(core=31),
|
||||
"TextureBufferRange": exec_info(core=31),
|
||||
"TextureStorage1D": exec_info(core=31),
|
||||
"TextureStorage2D": exec_info(core=31),
|
||||
"TextureStorage3D": exec_info(core=31),
|
||||
"TextureStorage2DMultisample": exec_info(core=31),
|
||||
"TextureStorage3DMultisample": exec_info(core=31),
|
||||
"TextureSubImage1D": exec_info(core=31),
|
||||
"TextureSubImage2D": exec_info(core=31),
|
||||
"TextureSubImage3D": exec_info(core=31),
|
||||
"CompressedTextureSubImage1D": exec_info(core=31),
|
||||
"CompressedTextureSubImage2D": exec_info(core=31),
|
||||
"CompressedTextureSubImage3D": exec_info(core=31),
|
||||
"CopyTextureSubImage1D": exec_info(core=31),
|
||||
"CopyTextureSubImage2D": exec_info(core=31),
|
||||
"CopyTextureSubImage3D": exec_info(core=31),
|
||||
"TextureParameterf": exec_info(core=31),
|
||||
"TextureParameterfv": exec_info(core=31),
|
||||
"TextureParameteri": exec_info(core=31),
|
||||
"TextureParameterIiv": exec_info(core=31),
|
||||
"TextureParameterIuiv": exec_info(core=31),
|
||||
"TextureParameteriv": exec_info(core=31),
|
||||
"GenerateTextureMipmap": exec_info(core=31),
|
||||
"BindTextureUnit": exec_info(core=31),
|
||||
"GetTextureImage": exec_info(core=31),
|
||||
"GetCompressedTextureImage": exec_info(core=31),
|
||||
"GetTextureLevelParameterfv": exec_info(core=31),
|
||||
"GetTextureLevelParameteriv": exec_info(core=31),
|
||||
"GetTextureParameterfv": exec_info(core=31),
|
||||
"GetTextureParameterIiv": exec_info(core=31),
|
||||
"GetTextureParameterIuiv": exec_info(core=31),
|
||||
"GetTextureParameteriv": exec_info(core=31),
|
||||
"CreateVertexArrays": exec_info(core=31),
|
||||
"DisableVertexArrayAttrib": exec_info(core=31),
|
||||
"EnableVertexArrayAttrib": exec_info(core=31),
|
||||
"VertexArrayElementBuffer": exec_info(core=31),
|
||||
"VertexArrayVertexBuffer": exec_info(core=31),
|
||||
"VertexArrayVertexBuffers": exec_info(core=31),
|
||||
"VertexArrayAttribFormat": exec_info(core=31),
|
||||
"VertexArrayAttribIFormat": exec_info(core=31),
|
||||
"VertexArrayAttribLFormat": exec_info(core=31),
|
||||
"VertexArrayAttribBinding": exec_info(core=31),
|
||||
"VertexArrayBindingDivisor": exec_info(core=31),
|
||||
"GetVertexArrayiv": exec_info(core=31),
|
||||
"GetVertexArrayIndexediv": exec_info(core=31),
|
||||
"GetVertexArrayIndexed64iv": exec_info(core=31),
|
||||
"CreateSamplers": exec_info(core=31),
|
||||
"CreateProgramPipelines": exec_info(core=31),
|
||||
"CreateQueries": exec_info(core=31),
|
||||
"GetQueryBufferObjectiv": exec_info(core=31),
|
||||
"GetQueryBufferObjectuiv": exec_info(core=31),
|
||||
"GetQueryBufferObjecti64v": exec_info(core=31),
|
||||
"GetQueryBufferObjectui64v": exec_info(core=31),
|
||||
}
|
@@ -29,6 +29,7 @@ import collections
|
||||
import license
|
||||
import gl_XML
|
||||
import sys, getopt
|
||||
import apiexec
|
||||
|
||||
|
||||
exec_flavor_map = {
|
||||
@@ -175,18 +176,49 @@ class PrintCode(gl_XML.gl_print_base):
|
||||
raise Exception(
|
||||
'Unrecognized exec flavor {0!r}'.format(f.exec_flavor))
|
||||
condition_parts = []
|
||||
if f.desktop:
|
||||
if f.deprecated:
|
||||
if f.name in apiexec.functions:
|
||||
ex = apiexec.functions[f.name]
|
||||
unconditional_count = 0
|
||||
|
||||
if ex.compatibility is not None:
|
||||
condition_parts.append('ctx->API == API_OPENGL_COMPAT')
|
||||
else:
|
||||
condition_parts.append('_mesa_is_desktop_gl(ctx)')
|
||||
if 'es1' in f.api_map:
|
||||
condition_parts.append('ctx->API == API_OPENGLES')
|
||||
if 'es2' in f.api_map:
|
||||
if f.api_map['es2'] > 2.0:
|
||||
condition_parts.append('(ctx->API == API_OPENGLES2 && ctx->Version >= {0})'.format(int(f.api_map['es2'] * 10)))
|
||||
else:
|
||||
condition_parts.append('ctx->API == API_OPENGLES2')
|
||||
unconditional_count += 1
|
||||
|
||||
if ex.core is not None:
|
||||
condition_parts.append('ctx->API == API_OPENGL_CORE')
|
||||
unconditional_count += 1
|
||||
|
||||
if ex.es1 is not None:
|
||||
condition_parts.append('ctx->API == API_OPENGLES')
|
||||
unconditional_count += 1
|
||||
|
||||
if ex.es2 is not None:
|
||||
if ex.es2 > 20:
|
||||
condition_parts.append('(ctx->API == API_OPENGLES2 && ctx->Version >= {0})'.format(ex.es2))
|
||||
else:
|
||||
condition_parts.append('ctx->API == API_OPENGLES2')
|
||||
unconditional_count += 1
|
||||
|
||||
# If the function is unconditionally available in all four
|
||||
# APIs, then it is always available. Replace the complex
|
||||
# tautology condition with "true" and let GCC do the right
|
||||
# thing.
|
||||
if unconditional_count == 4:
|
||||
condition_parts = ['true']
|
||||
else:
|
||||
if f.desktop:
|
||||
if f.deprecated:
|
||||
condition_parts.append('ctx->API == API_OPENGL_COMPAT')
|
||||
else:
|
||||
condition_parts.append('_mesa_is_desktop_gl(ctx)')
|
||||
if 'es1' in f.api_map:
|
||||
condition_parts.append('ctx->API == API_OPENGLES')
|
||||
if 'es2' in f.api_map:
|
||||
if f.api_map['es2'] > 2.0:
|
||||
condition_parts.append('(ctx->API == API_OPENGLES2 && ctx->Version >= {0})'.format(int(f.api_map['es2'] * 10)))
|
||||
else:
|
||||
condition_parts.append('ctx->API == API_OPENGLES2')
|
||||
|
||||
if not condition_parts:
|
||||
# This function does not exist in any API.
|
||||
continue
|
||||
|
@@ -44,7 +44,8 @@ LOCAL_C_INCLUDES := \
|
||||
LOCAL_SRC_FILES := \
|
||||
main/imports.c \
|
||||
program/prog_hash_table.c \
|
||||
program/symbol_table.c
|
||||
program/symbol_table.c \
|
||||
program/dummy_errors.c
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
@@ -68,7 +69,8 @@ LOCAL_C_INCLUDES := \
|
||||
LOCAL_SRC_FILES := \
|
||||
main/imports.c \
|
||||
program/prog_hash_table.c \
|
||||
program/symbol_table.c
|
||||
program/symbol_table.c \
|
||||
program/dummy_errors.c
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
include $(BUILD_HOST_STATIC_LIBRARY)
|
||||
|
@@ -60,6 +60,7 @@ mesa_dri_drivers_la_LIBADD = \
|
||||
../../libmesa.la \
|
||||
common/libmegadriver_stub.la \
|
||||
common/libdricommon.la \
|
||||
common/libxmlconfig.la \
|
||||
$(MEGADRIVERS_DEPS) \
|
||||
$(DRI_LIB_DEPS) \
|
||||
$()
|
||||
|
@@ -48,7 +48,9 @@ else
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
endif
|
||||
|
||||
LOCAL_SRC_FILES := $(DRI_COMMON_FILES)
|
||||
LOCAL_SRC_FILES := \
|
||||
$(DRI_COMMON_FILES) \
|
||||
$(XMLCONFIG_FILES)
|
||||
|
||||
MESA_DRI_OPTIONS_H := $(intermediates)/xmlpool/options.h
|
||||
LOCAL_GENERATED_SOURCES := $(MESA_DRI_OPTIONS_H)
|
||||
|
@@ -33,16 +33,20 @@ AM_CFLAGS = \
|
||||
-I$(top_srcdir)/src/gallium/include \
|
||||
-I$(top_srcdir)/src/gallium/auxiliary \
|
||||
$(DEFINES) \
|
||||
$(EXPAT_CFLAGS) \
|
||||
$(VISIBILITY_CFLAGS)
|
||||
|
||||
noinst_LTLIBRARIES = \
|
||||
libdricommon.la \
|
||||
libxmlconfig.la \
|
||||
libmegadriver_stub.la \
|
||||
libdri_test_stubs.la
|
||||
|
||||
libdricommon_la_SOURCES = $(DRI_COMMON_FILES)
|
||||
|
||||
libxmlconfig_la_SOURCES = $(XMLCONFIG_FILES)
|
||||
libxmlconfig_la_CFLAGS = $(AM_CFLAGS) $(EXPAT_CFLAGS)
|
||||
libxmlconfig_la_LIBADD = $(EXPAT_LIBS) -lm
|
||||
|
||||
libdri_test_stubs_la_SOURCES = $(test_stubs_FILES)
|
||||
libdri_test_stubs_la_CFLAGS = $(AM_CFLAGS) -DNO_MAIN
|
||||
|
||||
|
@@ -2,7 +2,9 @@ DRI_COMMON_FILES := \
|
||||
utils.c \
|
||||
utils.h \
|
||||
dri_util.c \
|
||||
dri_util.h \
|
||||
dri_util.h
|
||||
|
||||
XMLCONFIG_FILES := \
|
||||
xmlconfig.c \
|
||||
xmlconfig.h
|
||||
|
||||
|
@@ -37,7 +37,7 @@ drienv.PkgUseModules('DRM')
|
||||
# else
|
||||
#env.Append(CPPDEFINES = ['__NOT_HAVE_DRM_H'])
|
||||
|
||||
sources = drienv.ParseSourceList('Makefile.sources', 'DRI_COMMON_FILES')
|
||||
sources = drienv.ParseSourceList('Makefile.sources', ['DRI_COMMON_FILES', 'XMLCONFIG_FILES' ])
|
||||
|
||||
dri_common = drienv.ConvenienceLibrary(
|
||||
target = 'dri_common',
|
||||
|
@@ -83,7 +83,6 @@ intelInitExtensions(struct gl_context *ctx)
|
||||
if (intel->gen >= 3) {
|
||||
ctx->Extensions.ARB_ES2_compatibility = true;
|
||||
ctx->Extensions.ARB_depth_texture = true;
|
||||
ctx->Extensions.ARB_direct_state_access = true;
|
||||
ctx->Extensions.ARB_fragment_program = true;
|
||||
ctx->Extensions.ARB_shadow = true;
|
||||
ctx->Extensions.ARB_texture_non_power_of_two = true;
|
||||
|
@@ -48,6 +48,7 @@ libi965_dri_la_LIBADD = $(INTEL_LIBS)
|
||||
TEST_LIBS = \
|
||||
libi965_dri.la \
|
||||
../common/libdricommon.la \
|
||||
../common/libxmlconfig.la \
|
||||
../common/libmegadriver_stub.la \
|
||||
../../../libmesa.la \
|
||||
$(DRI_LIB_DEPS) \
|
||||
|
@@ -442,6 +442,13 @@ brw_initialize_context_constants(struct brw_context *brw)
|
||||
ctx->Const.LineWidthGranularity = 0.5;
|
||||
}
|
||||
|
||||
/* For non-antialiased lines, we have to round the line width to the
|
||||
* nearest whole number. Make sure that we don't advertise a line
|
||||
* width that, when rounded, will be beyond the actual hardware
|
||||
* maximum.
|
||||
*/
|
||||
assert(roundf(ctx->Const.MaxLineWidth) <= ctx->Const.MaxLineWidth);
|
||||
|
||||
ctx->Const.MinPointSize = 1.0;
|
||||
ctx->Const.MinPointSizeAA = 1.0;
|
||||
ctx->Const.MaxPointSize = 255.0;
|
||||
|
@@ -849,6 +849,12 @@ set_3src_source_index(const struct brw_device_info *devinfo,
|
||||
static bool
|
||||
has_unmapped_bits(const struct brw_device_info *devinfo, brw_inst *src)
|
||||
{
|
||||
/* EOT can only be mapped on a send if the src1 is an immediate */
|
||||
if ((brw_inst_opcode(devinfo, src) == BRW_OPCODE_SENDC ||
|
||||
brw_inst_opcode(devinfo, src) == BRW_OPCODE_SEND) &&
|
||||
brw_inst_eot(devinfo, src))
|
||||
return true;
|
||||
|
||||
/* Check for instruction bits that don't map to any of the fields of the
|
||||
* compacted instruction. The instruction cannot be compacted if any of
|
||||
* them are set. They overlap with:
|
||||
|
@@ -1050,7 +1050,7 @@ fs_visitor::implied_mrf_writes(fs_inst *inst)
|
||||
case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD:
|
||||
return inst->mlen;
|
||||
case SHADER_OPCODE_GEN4_SCRATCH_WRITE:
|
||||
return 2;
|
||||
return inst->mlen;
|
||||
case SHADER_OPCODE_UNTYPED_ATOMIC:
|
||||
case SHADER_OPCODE_UNTYPED_SURFACE_READ:
|
||||
case SHADER_OPCODE_UNTYPED_SURFACE_WRITE:
|
||||
@@ -3606,6 +3606,10 @@ fs_visitor::lower_integer_multiplication()
|
||||
* schedule multi-component multiplications much better.
|
||||
*/
|
||||
|
||||
if (inst->conditional_mod && inst->dst.is_null()) {
|
||||
inst->dst = fs_reg(GRF, alloc.allocate(dispatch_width / 8),
|
||||
inst->dst.type, dispatch_width);
|
||||
}
|
||||
fs_reg low = inst->dst;
|
||||
fs_reg high(GRF, alloc.allocate(dispatch_width / 8),
|
||||
inst->dst.type, dispatch_width);
|
||||
@@ -3655,6 +3659,13 @@ fs_visitor::lower_integer_multiplication()
|
||||
low.stride = 2;
|
||||
|
||||
insert(ADD(dst, low, high));
|
||||
|
||||
if (inst->conditional_mod) {
|
||||
fs_reg null(retype(brw_null_reg(), inst->dst.type));
|
||||
fs_inst *mov = MOV(null, inst->dst);
|
||||
mov->conditional_mod = inst->conditional_mod;
|
||||
insert(mov);
|
||||
}
|
||||
}
|
||||
#undef insert
|
||||
|
||||
|
@@ -201,7 +201,8 @@ public:
|
||||
void setup_payload_interference(struct ra_graph *g, int payload_reg_count,
|
||||
int first_payload_node);
|
||||
void setup_mrf_hack_interference(struct ra_graph *g,
|
||||
int first_mrf_hack_node);
|
||||
int first_mrf_hack_node,
|
||||
int *first_used_mrf);
|
||||
int choose_spill_reg(struct ra_graph *g);
|
||||
void spill_reg(int spill_reg);
|
||||
void split_virtual_grfs();
|
||||
|
@@ -779,27 +779,19 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src
|
||||
brw_mark_surface_used(prog_data, sampler + base_binding_table_index);
|
||||
} else {
|
||||
/* Non-const sampler index */
|
||||
/* Note: this clobbers `dst` as a temporary before emitting the send */
|
||||
|
||||
struct brw_reg addr = vec1(retype(brw_address_reg(0), BRW_REGISTER_TYPE_UD));
|
||||
struct brw_reg temp = vec1(retype(dst, BRW_REGISTER_TYPE_UD));
|
||||
|
||||
struct brw_reg sampler_reg = vec1(retype(sampler_index, BRW_REGISTER_TYPE_UD));
|
||||
|
||||
brw_push_insn_state(p);
|
||||
brw_set_default_mask_control(p, BRW_MASK_DISABLE);
|
||||
brw_set_default_access_mode(p, BRW_ALIGN_1);
|
||||
|
||||
/* Some care required: `sampler` and `temp` may alias:
|
||||
* addr = sampler & 0xff
|
||||
* temp = (sampler << 8) & 0xf00
|
||||
* addr = addr | temp
|
||||
*/
|
||||
brw_ADD(p, addr, sampler_reg, brw_imm_ud(base_binding_table_index));
|
||||
brw_SHL(p, temp, sampler_reg, brw_imm_ud(8u));
|
||||
brw_AND(p, temp, temp, brw_imm_ud(0x0f00));
|
||||
brw_AND(p, addr, addr, brw_imm_ud(0x0ff));
|
||||
brw_OR(p, addr, addr, temp);
|
||||
/* addr = ((sampler * 0x101) + base_binding_table_index) & 0xfff */
|
||||
brw_MUL(p, addr, sampler_reg, brw_imm_uw(0x101));
|
||||
if (base_binding_table_index)
|
||||
brw_ADD(p, addr, addr, brw_imm_ud(base_binding_table_index));
|
||||
brw_AND(p, addr, addr, brw_imm_ud(0xfff));
|
||||
|
||||
brw_pop_insn_state(p);
|
||||
|
||||
|
@@ -501,11 +501,13 @@ fs_visitor::get_used_mrfs(bool *mrf_used)
|
||||
* messages (treated as MRFs in code generation).
|
||||
*/
|
||||
void
|
||||
fs_visitor::setup_mrf_hack_interference(struct ra_graph *g, int first_mrf_node)
|
||||
fs_visitor::setup_mrf_hack_interference(struct ra_graph *g, int first_mrf_node,
|
||||
int *first_used_mrf)
|
||||
{
|
||||
bool mrf_used[BRW_MAX_MRF];
|
||||
get_used_mrfs(mrf_used);
|
||||
|
||||
*first_used_mrf = BRW_MAX_MRF;
|
||||
for (int i = 0; i < BRW_MAX_MRF; i++) {
|
||||
/* Mark each MRF reg node as being allocated to its physical register.
|
||||
*
|
||||
@@ -518,6 +520,9 @@ fs_visitor::setup_mrf_hack_interference(struct ra_graph *g, int first_mrf_node)
|
||||
* that are used as conflicting with all virtual GRFs.
|
||||
*/
|
||||
if (mrf_used[i]) {
|
||||
if (i < *first_used_mrf)
|
||||
*first_used_mrf = i;
|
||||
|
||||
for (unsigned j = 0; j < this->alloc.count; j++) {
|
||||
ra_add_node_interference(g, first_mrf_node + i, j);
|
||||
}
|
||||
@@ -584,7 +589,8 @@ fs_visitor::assign_regs(bool allow_spilling)
|
||||
|
||||
setup_payload_interference(g, payload_node_count, first_payload_node);
|
||||
if (devinfo->gen >= 7) {
|
||||
setup_mrf_hack_interference(g, first_mrf_hack_node);
|
||||
int first_used_mrf = BRW_MAX_MRF;
|
||||
setup_mrf_hack_interference(g, first_mrf_hack_node, &first_used_mrf);
|
||||
|
||||
foreach_block_and_inst(block, fs_inst, inst, cfg) {
|
||||
/* When we do send-from-GRF for FB writes, we need to ensure that
|
||||
@@ -600,6 +606,13 @@ fs_visitor::assign_regs(bool allow_spilling)
|
||||
if (inst->eot) {
|
||||
int size = alloc.sizes[inst->src[0].reg];
|
||||
int reg = compiler->fs_reg_sets[rsi].class_to_ra_reg_range[size] - 1;
|
||||
|
||||
/* If something happened to spill, we want to push the EOT send
|
||||
* register early enough in the register file that we don't
|
||||
* conflict with any used MRF hack registers.
|
||||
*/
|
||||
reg -= BRW_MAX_MRF - first_used_mrf;
|
||||
|
||||
ra_set_node_reg(g, inst->src[0].reg, reg);
|
||||
break;
|
||||
}
|
||||
|
@@ -3711,7 +3711,11 @@ fs_visitor::emit_single_fb_write(fs_reg color0, fs_reg color1,
|
||||
if (prog->OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
|
||||
/* Hand over gl_FragDepth. */
|
||||
assert(this->frag_depth.file != BAD_FILE);
|
||||
sources[length] = this->frag_depth;
|
||||
if (exec_size < dispatch_width) {
|
||||
sources[length] = half(this->frag_depth, use_2nd_half);
|
||||
} else {
|
||||
sources[length] = this->frag_depth;
|
||||
}
|
||||
} else {
|
||||
/* Pass through the payload depth. */
|
||||
sources[length] = fs_reg(brw_vec8_grf(payload.source_depth_reg, 0));
|
||||
|
@@ -35,9 +35,24 @@
|
||||
|
||||
#include "main/mtypes.h"
|
||||
#include "main/imports.h"
|
||||
#include "brw_context.h"
|
||||
|
||||
extern GLuint brw_translate_blend_factor( GLenum factor );
|
||||
extern GLuint brw_translate_blend_equation( GLenum mode );
|
||||
extern GLenum brw_fix_xRGB_alpha(GLenum function);
|
||||
|
||||
static inline float
|
||||
brw_get_line_width(struct brw_context *brw)
|
||||
{
|
||||
/* From the OpenGL 4.4 spec:
|
||||
*
|
||||
* "The actual width of non-antialiased lines is determined by rounding
|
||||
* the supplied width to the nearest integer, then clamping it to the
|
||||
* implementation-dependent maximum non-antialiased line width."
|
||||
*/
|
||||
return CLAMP(!brw->ctx.Multisample._Enabled && !brw->ctx.Line.SmoothFlag
|
||||
? roundf(brw->ctx.Line.Width) : brw->ctx.Line.Width,
|
||||
0.0, brw->ctx.Const.MaxLineWidth);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -398,27 +398,19 @@ vec4_generator::generate_tex(vec4_instruction *inst,
|
||||
brw_mark_surface_used(&prog_data->base, sampler + base_binding_table_index);
|
||||
} else {
|
||||
/* Non-constant sampler index. */
|
||||
/* Note: this clobbers `dst` as a temporary before emitting the send */
|
||||
|
||||
struct brw_reg addr = vec1(retype(brw_address_reg(0), BRW_REGISTER_TYPE_UD));
|
||||
struct brw_reg temp = vec1(retype(dst, BRW_REGISTER_TYPE_UD));
|
||||
|
||||
struct brw_reg sampler_reg = vec1(retype(sampler_index, BRW_REGISTER_TYPE_UD));
|
||||
|
||||
brw_push_insn_state(p);
|
||||
brw_set_default_mask_control(p, BRW_MASK_DISABLE);
|
||||
brw_set_default_access_mode(p, BRW_ALIGN_1);
|
||||
|
||||
/* Some care required: `sampler` and `temp` may alias:
|
||||
* addr = sampler & 0xff
|
||||
* temp = (sampler << 8) & 0xf00
|
||||
* addr = addr | temp
|
||||
*/
|
||||
brw_ADD(p, addr, sampler_reg, brw_imm_ud(base_binding_table_index));
|
||||
brw_SHL(p, temp, sampler_reg, brw_imm_ud(8u));
|
||||
brw_AND(p, temp, temp, brw_imm_ud(0x0f00));
|
||||
brw_AND(p, addr, addr, brw_imm_ud(0x0ff));
|
||||
brw_OR(p, addr, addr, temp);
|
||||
/* addr = ((sampler * 0x101) + base_binding_table_index) & 0xfff */
|
||||
brw_MUL(p, addr, sampler_reg, brw_imm_uw(0x101));
|
||||
if (base_binding_table_index)
|
||||
brw_ADD(p, addr, addr, brw_imm_ud(base_binding_table_index));
|
||||
brw_AND(p, addr, addr, brw_imm_ud(0xfff));
|
||||
|
||||
brw_pop_insn_state(p);
|
||||
|
||||
|
@@ -2460,11 +2460,27 @@ vec4_visitor::emit_mcs_fetch(ir_texture *ir, src_reg coordinate, src_reg sampler
|
||||
new(mem_ctx) vec4_instruction(SHADER_OPCODE_TXF_MCS,
|
||||
dst_reg(this, glsl_type::uvec4_type));
|
||||
inst->base_mrf = 2;
|
||||
inst->mlen = 1;
|
||||
inst->src[1] = sampler;
|
||||
|
||||
int param_base;
|
||||
|
||||
if (devinfo->gen >= 9) {
|
||||
/* Gen9+ needs a message header in order to use SIMD4x2 mode */
|
||||
vec4_instruction *header_inst = new(mem_ctx)
|
||||
vec4_instruction(VS_OPCODE_SET_SIMD4X2_HEADER_GEN9,
|
||||
dst_reg(MRF, inst->base_mrf));
|
||||
|
||||
emit(header_inst);
|
||||
|
||||
inst->mlen = 2;
|
||||
inst->header_size = 1;
|
||||
param_base = inst->base_mrf + 1;
|
||||
} else {
|
||||
inst->mlen = 1;
|
||||
param_base = inst->base_mrf;
|
||||
}
|
||||
|
||||
/* parameters are: u, v, r, lod; lod will always be zero due to api restrictions */
|
||||
int param_base = inst->base_mrf;
|
||||
int coord_mask = (1 << ir->coordinate->type->vector_elements) - 1;
|
||||
int zero_mask = 0xf & ~coord_mask;
|
||||
|
||||
|
@@ -361,11 +361,7 @@ upload_sf_state(struct brw_context *brw)
|
||||
|
||||
/* _NEW_LINE */
|
||||
{
|
||||
/* OpenGL dictates that line width should be rounded to the nearest
|
||||
* integer
|
||||
*/
|
||||
float line_width =
|
||||
roundf(CLAMP(ctx->Line.Width, 0.0, ctx->Const.MaxLineWidth));
|
||||
float line_width = brw_get_line_width(brw);
|
||||
uint32_t line_width_u3_7 = U_FIXED(line_width, 7);
|
||||
|
||||
/* Line width of 0 is not allowed when MSAA enabled */
|
||||
|
@@ -192,11 +192,7 @@ upload_sf_state(struct brw_context *brw)
|
||||
|
||||
/* _NEW_LINE */
|
||||
{
|
||||
/* OpenGL dictates that line width should be rounded to the nearest
|
||||
* integer
|
||||
*/
|
||||
float line_width =
|
||||
roundf(CLAMP(ctx->Line.Width, 0.0, ctx->Const.MaxLineWidth));
|
||||
float line_width = brw_get_line_width(brw);
|
||||
uint32_t line_width_u3_7 = U_FIXED(line_width, 7);
|
||||
/* Line width of 0 is not allowed when MSAA enabled */
|
||||
if (ctx->Multisample._Enabled) {
|
||||
|
@@ -417,6 +417,16 @@ gen8_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
|
||||
uint32_t surface_width = ALIGN(mt->logical_width0, level == 0 ? 8 : 1);
|
||||
uint32_t surface_height = ALIGN(mt->logical_height0, level == 0 ? 4 : 1);
|
||||
|
||||
/* From the documentation for 3DSTATE_WM_HZ_OP: "3DSTATE_MULTISAMPLE packet
|
||||
* must be used prior to this packet to change the Number of Multisamples.
|
||||
* This packet must not be used to change Number of Multisamples in a
|
||||
* rendering sequence."
|
||||
*/
|
||||
if (brw->num_samples != mt->num_samples) {
|
||||
gen8_emit_3dstate_multisample(brw, mt->num_samples);
|
||||
brw->NewGLState |= _NEW_MULTISAMPLE;
|
||||
}
|
||||
|
||||
/* The basic algorithm is:
|
||||
* - If needed, emit 3DSTATE_{DEPTH,HIER_DEPTH,STENCIL}_BUFFER and
|
||||
* 3DSTATE_CLEAR_PARAMS packets to set up the relevant buffers.
|
||||
|
@@ -154,11 +154,7 @@ upload_sf(struct brw_context *brw)
|
||||
dw1 |= GEN6_SF_VIEWPORT_TRANSFORM_ENABLE;
|
||||
|
||||
/* _NEW_LINE */
|
||||
/* OpenGL dictates that line width should be rounded to the nearest
|
||||
* integer
|
||||
*/
|
||||
float line_width =
|
||||
roundf(CLAMP(ctx->Line.Width, 0.0, ctx->Const.MaxLineWidth));
|
||||
float line_width = brw_get_line_width(brw);
|
||||
uint32_t line_width_u3_7 = U_FIXED(line_width, 7);
|
||||
if (line_width_u3_7 == 0)
|
||||
line_width_u3_7 = 1;
|
||||
|
@@ -130,6 +130,40 @@ set_blitter_tiling(struct brw_context *brw,
|
||||
ADVANCE_BATCH(); \
|
||||
} while (0)
|
||||
|
||||
static int
|
||||
blt_pitch(struct intel_mipmap_tree *mt)
|
||||
{
|
||||
int pitch = mt->pitch;
|
||||
if (mt->tiling)
|
||||
pitch /= 4;
|
||||
return pitch;
|
||||
}
|
||||
|
||||
bool
|
||||
intel_miptree_blit_compatible_formats(mesa_format src, mesa_format dst)
|
||||
{
|
||||
/* The BLT doesn't handle sRGB conversion */
|
||||
assert(src == _mesa_get_srgb_format_linear(src));
|
||||
assert(dst == _mesa_get_srgb_format_linear(dst));
|
||||
|
||||
/* No swizzle or format conversions possible, except... */
|
||||
if (src == dst)
|
||||
return true;
|
||||
|
||||
/* ...we can either discard the alpha channel when going from A->X,
|
||||
* or we can fill the alpha channel with 0xff when going from X->A
|
||||
*/
|
||||
if (src == MESA_FORMAT_B8G8R8A8_UNORM || src == MESA_FORMAT_B8G8R8X8_UNORM)
|
||||
return (dst == MESA_FORMAT_B8G8R8A8_UNORM ||
|
||||
dst == MESA_FORMAT_B8G8R8X8_UNORM);
|
||||
|
||||
if (src == MESA_FORMAT_R8G8B8A8_UNORM || src == MESA_FORMAT_R8G8B8X8_UNORM)
|
||||
return (dst == MESA_FORMAT_R8G8B8A8_UNORM ||
|
||||
dst == MESA_FORMAT_R8G8B8X8_UNORM);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements a rectangular block transfer (blit) of pixels between two
|
||||
* miptrees.
|
||||
@@ -172,11 +206,7 @@ intel_miptree_blit(struct brw_context *brw,
|
||||
* the X channel don't matter), and XRGB8888 to ARGB8888 by setting the A
|
||||
* channel to 1.0 at the end.
|
||||
*/
|
||||
if (src_format != dst_format &&
|
||||
((src_format != MESA_FORMAT_B8G8R8A8_UNORM &&
|
||||
src_format != MESA_FORMAT_B8G8R8X8_UNORM) ||
|
||||
(dst_format != MESA_FORMAT_B8G8R8A8_UNORM &&
|
||||
dst_format != MESA_FORMAT_B8G8R8X8_UNORM))) {
|
||||
if (!intel_miptree_blit_compatible_formats(src_format, dst_format)) {
|
||||
perf_debug("%s: Can't use hardware blitter from %s to %s, "
|
||||
"falling back.\n", __func__,
|
||||
_mesa_get_format_name(src_format),
|
||||
@@ -197,14 +227,14 @@ intel_miptree_blit(struct brw_context *brw,
|
||||
*
|
||||
* Furthermore, intelEmitCopyBlit (which is called below) uses a signed
|
||||
* 16-bit integer to represent buffer pitch, so it can only handle buffer
|
||||
* pitches < 32k.
|
||||
* pitches < 32k. However, the pitch is measured in bytes for linear buffers
|
||||
* and dwords for tiled buffers.
|
||||
*
|
||||
* As a result of these two limitations, we can only use the blitter to do
|
||||
* this copy when the miptree's pitch is less than 32k.
|
||||
* this copy when the miptree's pitch is less than 32k linear or 128k tiled.
|
||||
*/
|
||||
if (src_mt->pitch >= 32768 ||
|
||||
dst_mt->pitch >= 32768) {
|
||||
perf_debug("Falling back due to >=32k pitch\n");
|
||||
if (blt_pitch(src_mt) >= 32768 || blt_pitch(dst_mt) >= 32768) {
|
||||
perf_debug("Falling back due to >= 32k/128k pitch\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -261,8 +291,9 @@ intel_miptree_blit(struct brw_context *brw,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (src_mt->format == MESA_FORMAT_B8G8R8X8_UNORM &&
|
||||
dst_mt->format == MESA_FORMAT_B8G8R8A8_UNORM) {
|
||||
/* XXX This could be done in a single pass using XY_FULL_MONO_PATTERN_BLT */
|
||||
if (_mesa_get_format_bits(src_format, GL_ALPHA_BITS) == 0 &&
|
||||
_mesa_get_format_bits(dst_format, GL_ALPHA_BITS) > 0) {
|
||||
intel_miptree_set_alpha_to_one(brw, dst_mt,
|
||||
dst_x, dst_y,
|
||||
width, height);
|
||||
|
@@ -46,6 +46,8 @@ intelEmitCopyBlit(struct brw_context *brw,
|
||||
GLshort w, GLshort h,
|
||||
GLenum logicop );
|
||||
|
||||
bool intel_miptree_blit_compatible_formats(mesa_format src, mesa_format dst);
|
||||
|
||||
bool intel_miptree_blit(struct brw_context *brw,
|
||||
struct intel_mipmap_tree *src_mt,
|
||||
int src_level, int src_slice,
|
||||
|
@@ -183,7 +183,6 @@ intelInitExtensions(struct gl_context *ctx)
|
||||
ctx->Extensions.ARB_depth_buffer_float = true;
|
||||
ctx->Extensions.ARB_depth_clamp = true;
|
||||
ctx->Extensions.ARB_depth_texture = true;
|
||||
ctx->Extensions.ARB_direct_state_access = true;
|
||||
ctx->Extensions.ARB_draw_elements_base_vertex = true;
|
||||
ctx->Extensions.ARB_draw_instanced = true;
|
||||
ctx->Extensions.ARB_ES2_compatibility = true;
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "main/glheader.h"
|
||||
#include "main/enums.h"
|
||||
#include "main/image.h"
|
||||
#include "main/glformats.h"
|
||||
#include "main/mtypes.h"
|
||||
#include "main/condrender.h"
|
||||
#include "main/fbobject.h"
|
||||
@@ -76,8 +77,16 @@ do_blit_drawpixels(struct gl_context * ctx,
|
||||
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0];
|
||||
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
|
||||
|
||||
if (!_mesa_format_matches_format_and_type(irb->mt->format, format, type,
|
||||
false)) {
|
||||
mesa_format src_format = _mesa_format_from_format_and_type(format, type);
|
||||
if (_mesa_format_is_mesa_array_format(src_format))
|
||||
src_format = _mesa_format_from_array_format(src_format);
|
||||
mesa_format dst_format = irb->mt->format;
|
||||
|
||||
/* We can safely discard sRGB encode/decode for the DrawPixels interface */
|
||||
src_format = _mesa_get_srgb_format_linear(src_format);
|
||||
dst_format = _mesa_get_srgb_format_linear(dst_format);
|
||||
|
||||
if (!intel_miptree_blit_compatible_formats(src_format, dst_format)) {
|
||||
DBG("%s: bad format for blit\n", __func__);
|
||||
return false;
|
||||
}
|
||||
|
@@ -62,7 +62,9 @@
|
||||
#include "swrast/s_context.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#ifdef HAVE_SYS_SYSCTL_H
|
||||
# include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
const __DRIextension **__driDriverGetExtensions_swrast(void);
|
||||
|
||||
|
@@ -39,7 +39,6 @@ nodist_EXTRA_lib@OSMESA_LIB@_la_SOURCES = dummy.cpp
|
||||
lib@OSMESA_LIB@_la_SOURCES = osmesa.c
|
||||
|
||||
lib@OSMESA_LIB@_la_LDFLAGS = \
|
||||
-module \
|
||||
-no-undefined \
|
||||
-version-number @OSMESA_VERSION@ \
|
||||
$(GC_SECTIONS) \
|
||||
|
@@ -38,6 +38,9 @@ _mesa_initialize_exec_table(struct gl_context *ctx);
|
||||
extern void
|
||||
_mesa_initialize_dispatch_tables(struct gl_context *ctx);
|
||||
|
||||
extern struct _glapi_table *
|
||||
_mesa_new_nop_table(unsigned numEntries);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
@@ -1772,7 +1772,9 @@ _mesa_loopback_init_api_table(const struct gl_context *ctx,
|
||||
SET_VertexAttribI4sv(dest, _mesa_VertexAttribI4sv);
|
||||
SET_VertexAttribI4ubv(dest, _mesa_VertexAttribI4ubv);
|
||||
SET_VertexAttribI4usv(dest, _mesa_VertexAttribI4usv);
|
||||
}
|
||||
|
||||
if (ctx->API == API_OPENGL_CORE) {
|
||||
/* GL 4.1 / GL_ARB_vertex_attrib_64bit */
|
||||
SET_VertexAttribL1d(dest, _mesa_VertexAttribL1d);
|
||||
SET_VertexAttribL2d(dest, _mesa_VertexAttribL2d);
|
||||
|
@@ -617,14 +617,6 @@ void GLAPIENTRY
|
||||
_mesa_CreateVertexArrays(GLsizei n, GLuint *arrays)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCreateVertexArrays(GL_ARB_direct_state_access "
|
||||
"is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
gen_vertex_arrays(ctx, n, arrays, true, "glCreateVertexArrays");
|
||||
}
|
||||
|
||||
@@ -667,13 +659,6 @@ _mesa_VertexArrayElementBuffer(GLuint vaobj, GLuint buffer)
|
||||
struct gl_vertex_array_object *vao;
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glVertexArrayElementBuffer(GL_ARB_direct_state_access "
|
||||
"is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
/* The GL_ARB_direct_state_access specification says:
|
||||
@@ -710,13 +695,6 @@ _mesa_GetVertexArrayiv(GLuint vaobj, GLenum pname, GLint *param)
|
||||
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetVertexArrayiv(GL_ARB_direct_state_access "
|
||||
"is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
/* The GL_ARB_direct_state_access specification says:
|
||||
*
|
||||
* "An INVALID_OPERATION error is generated if <vaobj> is not
|
||||
|
@@ -540,13 +540,6 @@ _mesa_BlitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_framebuffer *readFb, *drawFb;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glBlitNamedFramebuffer(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (MESA_VERBOSE & VERBOSE_API)
|
||||
_mesa_debug(ctx,
|
||||
"glBlitNamedFramebuffer(%u %u %d, %d, %d, %d, "
|
||||
|
@@ -1303,12 +1303,6 @@ create_buffers(GLsizei n, GLuint *buffers, bool dsa)
|
||||
|
||||
const char *func = dsa ? "glCreateBuffers" : "glGenBuffers";
|
||||
|
||||
if (dsa && !ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(GL_ARB_direct_state_access is not supported)", func);
|
||||
return;
|
||||
}
|
||||
|
||||
if (MESA_VERBOSE & VERBOSE_API)
|
||||
_mesa_debug(ctx, "%s(%d)\n", func, n);
|
||||
|
||||
@@ -1483,13 +1477,6 @@ _mesa_NamedBufferStorage(GLuint buffer, GLsizeiptr size, const GLvoid *data,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glNamedBufferStorage(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glNamedBufferStorage");
|
||||
if (!bufObj)
|
||||
return;
|
||||
@@ -1616,13 +1603,6 @@ _mesa_NamedBufferData(GLuint buffer, GLsizeiptr size, const GLvoid *data,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glNamedBufferData(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glNamedBufferData");
|
||||
if (!bufObj)
|
||||
return;
|
||||
@@ -1693,13 +1673,6 @@ _mesa_NamedBufferSubData(GLuint buffer, GLintptr offset,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glNamedBufferSubData(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glNamedBufferSubData");
|
||||
if (!bufObj)
|
||||
return;
|
||||
@@ -1737,13 +1710,6 @@ _mesa_GetNamedBufferSubData(GLuint buffer, GLintptr offset,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetNamedBufferSubData(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
|
||||
"glGetNamedBufferSubData");
|
||||
if (!bufObj)
|
||||
@@ -1839,13 +1805,6 @@ _mesa_ClearNamedBufferData(GLuint buffer, GLenum internalformat,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glClearNamedBufferData(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glClearNamedBufferData");
|
||||
if (!bufObj)
|
||||
return;
|
||||
@@ -1883,13 +1842,6 @@ _mesa_ClearNamedBufferSubData(GLuint buffer, GLenum internalformat,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glClearNamedBufferSubData(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
|
||||
"glClearNamedBufferSubData");
|
||||
if (!bufObj)
|
||||
@@ -1978,13 +1930,6 @@ _mesa_UnmapNamedBuffer(GLuint buffer)
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glUnmapNamedBuffer(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glUnmapNamedBuffer");
|
||||
if (!bufObj)
|
||||
return GL_FALSE;
|
||||
@@ -2094,13 +2039,6 @@ _mesa_GetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint *params)
|
||||
struct gl_buffer_object *bufObj;
|
||||
GLint64 parameter;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetNamedBufferParameteriv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
|
||||
"glGetNamedBufferParameteriv");
|
||||
if (!bufObj)
|
||||
@@ -2121,13 +2059,6 @@ _mesa_GetNamedBufferParameteri64v(GLuint buffer, GLenum pname,
|
||||
struct gl_buffer_object *bufObj;
|
||||
GLint64 parameter;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetNamedBufferParameteri64v(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
|
||||
"glGetNamedBufferParameteri64v");
|
||||
if (!bufObj)
|
||||
@@ -2167,13 +2098,6 @@ _mesa_GetNamedBufferPointerv(GLuint buffer, GLenum pname, GLvoid **params)
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetNamedBufferPointerv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (pname != GL_BUFFER_MAP_POINTER) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetNamedBufferPointerv(pname != "
|
||||
"GL_BUFFER_MAP_POINTER)");
|
||||
@@ -2288,13 +2212,6 @@ _mesa_CopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object *src, *dst;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCopyNamedBufferSubData(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
src = _mesa_lookup_bufferobj_err(ctx, readBuffer,
|
||||
"glCopyNamedBufferSubData");
|
||||
if (!src)
|
||||
@@ -2513,13 +2430,6 @@ _mesa_MapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glMapNamedBufferRange(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!ctx->Extensions.ARB_map_buffer_range) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glMapNamedBufferRange("
|
||||
@@ -2587,13 +2497,6 @@ _mesa_MapNamedBuffer(GLuint buffer, GLenum access)
|
||||
struct gl_buffer_object *bufObj;
|
||||
GLbitfield accessFlags;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glMapNamedBuffer(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!get_map_buffer_access_flags(ctx, access, &accessFlags)) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glMapNamedBuffer(invalid access)");
|
||||
return NULL;
|
||||
@@ -2684,14 +2587,6 @@ _mesa_FlushMappedNamedBufferRange(GLuint buffer, GLintptr offset,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glFlushMappedNamedBufferRange(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
|
||||
"glFlushMappedNamedBufferRange");
|
||||
if (!bufObj)
|
||||
|
@@ -303,13 +303,6 @@ _mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf)
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_framebuffer *fb;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glNamedFramebufferDrawBuffer(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (framebuffer) {
|
||||
fb = _mesa_lookup_framebuffer_err(ctx, framebuffer,
|
||||
"glNamedFramebufferDrawBuffer");
|
||||
@@ -520,13 +513,6 @@ _mesa_NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_framebuffer *fb;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glNamedFramebufferDrawBuffers(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (framebuffer) {
|
||||
fb = _mesa_lookup_framebuffer_err(ctx, framebuffer,
|
||||
"glNamedFramebufferDrawBuffers");
|
||||
@@ -764,13 +750,6 @@ _mesa_NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src)
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_framebuffer *fb;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glNamedFramebufferReadBuffer(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (framebuffer) {
|
||||
fb = _mesa_lookup_framebuffer_err(ctx, framebuffer,
|
||||
"glNamedFramebufferReadBuffer");
|
||||
|
@@ -412,14 +412,6 @@ _mesa_ClearNamedFramebufferiv(GLuint framebuffer, GLenum buffer,
|
||||
{
|
||||
GLint oldfb;
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glClearNamedFramebufferiv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
_mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb);
|
||||
_mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer);
|
||||
_mesa_ClearBufferiv(buffer, drawbuffer, value);
|
||||
@@ -510,14 +502,6 @@ _mesa_ClearNamedFramebufferuiv(GLuint framebuffer, GLenum buffer,
|
||||
{
|
||||
GLint oldfb;
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glClearNamedFramebufferuiv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
_mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb);
|
||||
_mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer);
|
||||
_mesa_ClearBufferuiv(buffer, drawbuffer, value);
|
||||
@@ -629,14 +613,6 @@ _mesa_ClearNamedFramebufferfv(GLuint framebuffer, GLenum buffer,
|
||||
{
|
||||
GLint oldfb;
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glClearNamedFramebufferfv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
_mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb);
|
||||
_mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer);
|
||||
_mesa_ClearBufferfv(buffer, drawbuffer, value);
|
||||
@@ -719,14 +695,6 @@ _mesa_ClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer,
|
||||
{
|
||||
GLint oldfb;
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glClearNamedFramebufferfi(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
_mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb);
|
||||
_mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer);
|
||||
_mesa_ClearBufferfi(buffer, 0, depth, stencil);
|
||||
|
@@ -883,6 +883,19 @@ update_default_objects(struct gl_context *ctx)
|
||||
}
|
||||
|
||||
|
||||
/* XXX this is temporary and should be removed at some point in the
|
||||
* future when there's a reasonable expectation that the libGL library
|
||||
* contains the _glapi_new_nop_table() and _glapi_set_nop_handler()
|
||||
* functions which were added in Mesa 10.6.
|
||||
*/
|
||||
#if !defined(_WIN32)
|
||||
/* Avoid libGL / driver ABI break */
|
||||
#define USE_GLAPI_NOP_FEATURES 0
|
||||
#else
|
||||
#define USE_GLAPI_NOP_FEATURES 1
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* This function is called by the glapi no-op functions. For each OpenGL
|
||||
* function/entrypoint there's a simple no-op function. These "no-op"
|
||||
@@ -898,6 +911,7 @@ update_default_objects(struct gl_context *ctx)
|
||||
*
|
||||
* \param name the name of the OpenGL function
|
||||
*/
|
||||
#if USE_GLAPI_NOP_FEATURES
|
||||
static void
|
||||
nop_handler(const char *name)
|
||||
{
|
||||
@@ -914,6 +928,7 @@ nop_handler(const char *name)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
@@ -923,11 +938,51 @@ nop_handler(const char *name)
|
||||
static void GLAPIENTRY
|
||||
nop_glFlush(void)
|
||||
{
|
||||
/* don't record an error like we do in _mesa_generic_nop() */
|
||||
/* don't record an error like we do in nop_handler() */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if !USE_GLAPI_NOP_FEATURES
|
||||
static int
|
||||
generic_nop(void)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"unsupported function called "
|
||||
"(unsupported extension or deprecated function?)");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Create a new API dispatch table in which all entries point to the
|
||||
* generic_nop() function. This will not work on Windows because of
|
||||
* the __stdcall convention which requires the callee to clean up the
|
||||
* call stack. That's impossible with one generic no-op function.
|
||||
*/
|
||||
struct _glapi_table *
|
||||
_mesa_new_nop_table(unsigned numEntries)
|
||||
{
|
||||
struct _glapi_table *table;
|
||||
|
||||
#if !USE_GLAPI_NOP_FEATURES
|
||||
table = malloc(numEntries * sizeof(_glapi_proc));
|
||||
if (table) {
|
||||
_glapi_proc *entry = (_glapi_proc *) table;
|
||||
unsigned i;
|
||||
for (i = 0; i < numEntries; i++) {
|
||||
entry[i] = (_glapi_proc) generic_nop;
|
||||
}
|
||||
}
|
||||
#else
|
||||
table = _glapi_new_nop_table(numEntries);
|
||||
#endif
|
||||
return table;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Allocate and initialize a new dispatch table. The table will be
|
||||
* populated with pointers to "no-op" functions. In turn, the no-op
|
||||
@@ -941,8 +996,9 @@ alloc_dispatch_table(void)
|
||||
* Mesa we do this to accommodate different versions of libGL and various
|
||||
* DRI drivers.
|
||||
*/
|
||||
GLint numEntries = MAX2(_glapi_get_dispatch_table_size(), _gloffset_COUNT);
|
||||
struct _glapi_table *table = _glapi_new_nop_table(numEntries);
|
||||
int numEntries = MAX2(_glapi_get_dispatch_table_size(), _gloffset_COUNT);
|
||||
|
||||
struct _glapi_table *table = _mesa_new_nop_table(numEntries);
|
||||
|
||||
#if defined(_WIN32)
|
||||
if (table) {
|
||||
@@ -966,7 +1022,9 @@ alloc_dispatch_table(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if USE_GLAPI_NOP_FEATURES
|
||||
_glapi_set_nop_handler(nop_handler);
|
||||
#endif
|
||||
|
||||
return table;
|
||||
}
|
||||
|
@@ -104,7 +104,7 @@ static const struct extension extension_table[] = {
|
||||
{ "GL_ARB_depth_clamp", o(ARB_depth_clamp), GL, 2003 },
|
||||
{ "GL_ARB_depth_texture", o(ARB_depth_texture), GLL, 2001 },
|
||||
{ "GL_ARB_derivative_control", o(ARB_derivative_control), GL, 2014 },
|
||||
{ "GL_ARB_direct_state_access", o(ARB_direct_state_access), GL, 2014 },
|
||||
{ "GL_ARB_direct_state_access", o(dummy_true), GLC, 2014 },
|
||||
{ "GL_ARB_draw_buffers", o(dummy_true), GL, 2002 },
|
||||
{ "GL_ARB_draw_buffers_blend", o(ARB_draw_buffers_blend), GL, 2009 },
|
||||
{ "GL_ARB_draw_elements_base_vertex", o(ARB_draw_elements_base_vertex), GL, 2009 },
|
||||
|
@@ -1489,14 +1489,6 @@ void GLAPIENTRY
|
||||
_mesa_CreateRenderbuffers(GLsizei n, GLuint *renderbuffers)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCreateRenderbuffers(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
create_render_buffers(ctx, n, renderbuffers, true);
|
||||
}
|
||||
|
||||
@@ -1937,12 +1929,6 @@ renderbuffer_storage_named(GLuint renderbuffer, GLenum internalFormat,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(GL_ARB_direct_state_access is not supported)", func);
|
||||
return;
|
||||
}
|
||||
|
||||
if (MESA_VERBOSE & VERBOSE_API) {
|
||||
if (samples == NO_SAMPLES)
|
||||
_mesa_debug(ctx, "%s(%u, %s, %d, %d)\n",
|
||||
@@ -2197,13 +2183,6 @@ _mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetNamedRenderbufferParameteriv("
|
||||
"GL_ARB_direct_state_access is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
struct gl_renderbuffer *rb = _mesa_lookup_renderbuffer(ctx, renderbuffer);
|
||||
if (!rb || rb == &DummyRenderbuffer) {
|
||||
/* ID was reserved, but no real renderbuffer object made yet */
|
||||
@@ -2475,12 +2454,6 @@ create_framebuffers(GLsizei n, GLuint *framebuffers, bool dsa)
|
||||
|
||||
const char *func = dsa ? "glCreateFramebuffers" : "glGenFramebuffers";
|
||||
|
||||
if (dsa && !ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(GL_ARB_direct_state_access is not supported)", func);
|
||||
return;
|
||||
}
|
||||
|
||||
if (n < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "%s(n < 0)", func);
|
||||
return;
|
||||
@@ -2579,13 +2552,6 @@ _mesa_CheckNamedFramebufferStatus(GLuint framebuffer, GLenum target)
|
||||
struct gl_framebuffer *fb;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCheckNamedFramebufferStatus(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Validate the target (for conformance's sake) and grab a reference to the
|
||||
* default framebuffer in case framebuffer = 0.
|
||||
* Section 9.4 Framebuffer Completeness of the OpenGL 4.5 core spec
|
||||
@@ -2741,6 +2707,10 @@ check_texture_target(struct gl_context *ctx, GLenum target,
|
||||
/* We're being called by glFramebufferTextureLayer().
|
||||
* The only legal texture types for that function are 3D,
|
||||
* cube-map, and 1D/2D/cube-map array textures.
|
||||
*
|
||||
* We don't need to check for GL_ARB_texture_cube_map_array because the
|
||||
* application wouldn't have been able to create a texture with a
|
||||
* GL_TEXTURE_CUBE_MAP_ARRAY target if the extension were not enabled.
|
||||
*/
|
||||
switch (target) {
|
||||
case GL_TEXTURE_3D:
|
||||
@@ -2750,10 +2720,13 @@ check_texture_target(struct gl_context *ctx, GLenum target,
|
||||
case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
|
||||
return true;
|
||||
case GL_TEXTURE_CUBE_MAP:
|
||||
/* This target is valid in TextureLayer when ARB_direct_state_access
|
||||
* or OpenGL 4.5 is supported.
|
||||
/* We don't need to check the extension (GL_ARB_direct_state_access) or
|
||||
* GL version (4.5) for GL_TEXTURE_CUBE_MAP because DSA is always
|
||||
* enabled in core profile. This can be called from
|
||||
* _mesa_FramebufferTextureLayer in compatibility profile (OpenGL 3.0),
|
||||
* so we do have to check the profile.
|
||||
*/
|
||||
return ctx->Extensions.ARB_direct_state_access;
|
||||
return ctx->API == API_OPENGL_CORE;
|
||||
}
|
||||
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
@@ -3131,12 +3104,6 @@ _mesa_NamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment,
|
||||
|
||||
const char *func = "glNamedFramebufferTextureLayer";
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(GL_ARB_direct_state_access is not supported)", func);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get the framebuffer object */
|
||||
fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, func);
|
||||
if (!fb)
|
||||
@@ -3222,12 +3189,6 @@ _mesa_NamedFramebufferTexture(GLuint framebuffer, GLenum attachment,
|
||||
|
||||
const char *func = "glNamedFramebufferTexture";
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(GL_ARB_direct_state_access is not supported)", func);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_mesa_has_geometry_shaders(ctx)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"unsupported function (glNamedFramebufferTexture) called");
|
||||
@@ -3353,13 +3314,6 @@ _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment,
|
||||
struct gl_renderbuffer *rb;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glNamedFramebufferRenderbuffer(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
fb = _mesa_lookup_framebuffer_err(ctx, framebuffer,
|
||||
"glNamedFramebufferRenderbuffer");
|
||||
if (!fb)
|
||||
@@ -3694,13 +3648,6 @@ _mesa_GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_framebuffer *buffer;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetNamedFramebufferAttachmentParameteriv("
|
||||
"GL_ARB_direct_state_access is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (framebuffer) {
|
||||
buffer = _mesa_lookup_framebuffer_err(ctx, framebuffer,
|
||||
"glGetNamedFramebufferAttachmentParameteriv");
|
||||
@@ -3733,13 +3680,6 @@ _mesa_NamedFramebufferParameteri(GLuint framebuffer, GLenum pname,
|
||||
(void) pname;
|
||||
(void) param;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glNamedFramebufferParameteri("
|
||||
"GL_ARB_direct_state_access is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glNamedFramebufferParameteri not supported "
|
||||
"(ARB_framebuffer_no_attachments not implemented)");
|
||||
@@ -3756,13 +3696,6 @@ _mesa_GetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname,
|
||||
(void) pname;
|
||||
(void) param;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glNamedFramebufferParameteriv("
|
||||
"GL_ARB_direct_state_access is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetNamedFramebufferParameteriv not supported "
|
||||
"(ARB_framebuffer_no_attachments not implemented)");
|
||||
@@ -3931,13 +3864,6 @@ _mesa_InvalidateNamedFramebufferSubData(GLuint framebuffer,
|
||||
struct gl_framebuffer *fb;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glInvalidateNamedFramebufferSubData("
|
||||
"GL_ARB_direct_state_access is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* The OpenGL 4.5 core spec (02.02.2015) says (in Section 17.4 Whole
|
||||
* Framebuffer Operations, PDF page 522): "If framebuffer is zero, the
|
||||
* default draw framebuffer is affected."
|
||||
@@ -3999,13 +3925,6 @@ _mesa_InvalidateNamedFramebufferData(GLuint framebuffer,
|
||||
struct gl_framebuffer *fb;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glInvalidateNamedFramebufferData("
|
||||
"GL_ARB_direct_state_access is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* The OpenGL 4.5 core spec (02.02.2015) says (in Section 17.4 Whole
|
||||
* Framebuffer Operations, PDF page 522): "If framebuffer is zero, the
|
||||
* default draw framebuffer is affected."
|
||||
|
@@ -158,13 +158,6 @@ _mesa_GenerateTextureMipmap(GLuint texture)
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGenerateTextureMipmap(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture, "glGenerateTextureMipmap");
|
||||
if (!texObj)
|
||||
return;
|
||||
|
@@ -3621,7 +3621,6 @@ struct gl_extensions
|
||||
GLboolean ARB_depth_clamp;
|
||||
GLboolean ARB_depth_texture;
|
||||
GLboolean ARB_derivative_control;
|
||||
GLboolean ARB_direct_state_access;
|
||||
GLboolean ARB_draw_buffers_blend;
|
||||
GLboolean ARB_draw_elements_base_vertex;
|
||||
GLboolean ARB_draw_indirect;
|
||||
|
@@ -553,12 +553,6 @@ _mesa_CreateProgramPipelines(GLsizei n, GLuint *pipelines)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glCreateProgramPipelines("
|
||||
"GL_ARB_direct_state_access is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
create_program_pipelines(ctx, n, pipelines, true);
|
||||
}
|
||||
|
||||
|
@@ -220,12 +220,12 @@ _mesa_GetProgramResourceIndex(GLuint program, GLenum programInterface,
|
||||
case GL_PROGRAM_INPUT:
|
||||
case GL_PROGRAM_OUTPUT:
|
||||
case GL_UNIFORM:
|
||||
case GL_UNIFORM_BLOCK:
|
||||
case GL_TRANSFORM_FEEDBACK_VARYING:
|
||||
/* Validate name syntax for arrays. */
|
||||
/* Validate name syntax for array variables */
|
||||
if (!valid_program_resource_index_name(name))
|
||||
return GL_INVALID_INDEX;
|
||||
|
||||
/* fall-through */
|
||||
case GL_UNIFORM_BLOCK:
|
||||
res = _mesa_program_resource_find_name(shProg, programInterface, name);
|
||||
if (!res)
|
||||
return GL_INVALID_INDEX;
|
||||
|
@@ -284,13 +284,6 @@ _mesa_CreateQueries(GLenum target, GLsizei n, GLuint *ids)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCreateQueries(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (target) {
|
||||
case GL_SAMPLES_PASSED:
|
||||
case GL_ANY_SAMPLES_PASSED:
|
||||
|
@@ -221,13 +221,6 @@ void GLAPIENTRY
|
||||
_mesa_CreateSamplers(GLsizei count, GLuint *samplers)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glCreateSamplers("
|
||||
"GL_ARB_direct_state_access is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
create_samplers(ctx, count, samplers, "glCreateSamplers");
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1108,13 +1108,6 @@ _mesa_GetTextureImage(GLuint texture, GLint level, GLenum format,
|
||||
GLenum err;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureImage(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* This has been moved here because a format/type mismatch can cause a NULL
|
||||
* texImage object, which in turn causes the mismatch error to be
|
||||
@@ -1351,13 +1344,6 @@ _mesa_GetCompressedTextureImage(GLuint texture, GLint level,
|
||||
GLint image_stride;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetCompressedTextureImage(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glGetCompressedTextureImage");
|
||||
if (!texObj)
|
||||
|
@@ -3624,13 +3624,6 @@ texturesubimage(struct gl_context *ctx, GLuint dims,
|
||||
_mesa_lookup_enum_by_nr(format),
|
||||
_mesa_lookup_enum_by_nr(type), pixels);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureSubImage%uD(GL_ARB_direct_state_access "
|
||||
"is not supported)", dims);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get the texture object by Name. */
|
||||
texObj = _mesa_lookup_texture(ctx, texture);
|
||||
if (!texObj) {
|
||||
@@ -4190,12 +4183,6 @@ _mesa_CopyTextureSubImage1D(GLuint texture, GLint level,
|
||||
const char *self = "glCopyTextureSubImage1D";
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(GL_ARB_direct_state_access is not supported)", self);
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture, self);
|
||||
if (!texObj)
|
||||
return;
|
||||
@@ -4220,12 +4207,6 @@ _mesa_CopyTextureSubImage2D(GLuint texture, GLint level,
|
||||
const char *self = "glCopyTextureSubImage2D";
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(GL_ARB_direct_state_access is not supported)", self);
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture, self);
|
||||
if (!texObj)
|
||||
return;
|
||||
@@ -4253,12 +4234,6 @@ _mesa_CopyTextureSubImage3D(GLuint texture, GLint level,
|
||||
const char *self = "glCopyTextureSubImage3D";
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(GL_ARB_direct_state_access is not supported)", self);
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture, self);
|
||||
if (!texObj)
|
||||
return;
|
||||
@@ -4854,13 +4829,6 @@ _mesa_CompressedTextureSubImage1D(GLuint texture, GLint level, GLint xoffset,
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCompressedTextureSubImage1D(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glCompressedTextureSubImage1D");
|
||||
if (!texObj)
|
||||
@@ -4939,13 +4907,6 @@ _mesa_CompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset,
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCompressedTextureSubImage2D(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glCompressedTextureSubImage2D");
|
||||
if (!texObj)
|
||||
@@ -5024,13 +4985,6 @@ _mesa_CompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset,
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCompressedTextureSubImage3D(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glCompressedTextureSubImage3D");
|
||||
if (!texObj)
|
||||
@@ -5515,13 +5469,6 @@ _mesa_TextureBuffer(GLuint texture, GLenum internalFormat, GLuint buffer)
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureBuffer(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (buffer) {
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glTextureBuffer");
|
||||
if (!bufObj)
|
||||
@@ -5550,13 +5497,6 @@ _mesa_TextureBufferRange(GLuint texture, GLenum internalFormat, GLuint buffer,
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureBufferRange(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (buffer) {
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
|
||||
"glTextureBufferRange");
|
||||
@@ -5861,13 +5801,6 @@ _mesa_TextureStorage2DMultisample(GLuint texture, GLsizei samples,
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureStorage2DMultisample(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glTextureStorage2DMultisample");
|
||||
if (!texObj)
|
||||
@@ -5888,13 +5821,6 @@ _mesa_TextureStorage3DMultisample(GLuint texture, GLsizei samples,
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureStorage3DMultisample(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get the texture object by Name. */
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glTextureStorage3DMultisample");
|
||||
|
@@ -1317,13 +1317,6 @@ _mesa_CreateTextures(GLenum target, GLsizei n, GLuint *textures)
|
||||
GLint targetIndex;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCreateTextures(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* The 4.5 core profile spec (30.10.2014) doesn't specify what
|
||||
* glCreateTextures should do with invalid targets, which was probably an
|
||||
@@ -1815,13 +1808,6 @@ _mesa_BindTextureUnit(GLuint unit, GLuint texture)
|
||||
_mesa_debug(ctx, "glBindTextureUnit %s %d\n",
|
||||
_mesa_lookup_enum_by_nr(GL_TEXTURE0+unit), (GLint) texture);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glBindTextureUnit(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Section 8.1 (Texture Objects) of the OpenGL 4.5 core profile spec
|
||||
* (20141030) says:
|
||||
* "When texture is zero, each of the targets enumerated at the
|
||||
|
@@ -1108,13 +1108,6 @@ _mesa_TextureParameterfv(GLuint texture, GLenum pname, const GLfloat *params)
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureParameterfv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
@@ -1131,13 +1124,6 @@ _mesa_TextureParameterf(GLuint texture, GLenum pname, GLfloat param)
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureParameterf(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
@@ -1154,13 +1140,6 @@ _mesa_TextureParameteri(GLuint texture, GLenum pname, GLint param)
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureParameteri(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
@@ -1178,13 +1157,6 @@ _mesa_TextureParameteriv(GLuint texture, GLenum pname,
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureParameteriv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
@@ -1202,13 +1174,6 @@ _mesa_TextureParameterIiv(GLuint texture, GLenum pname, const GLint *params)
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureParameterIiv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
@@ -1226,13 +1191,6 @@ _mesa_TextureParameterIuiv(GLuint texture, GLenum pname, const GLuint *params)
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureParameterIuiv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
@@ -1692,13 +1650,6 @@ _mesa_GetTextureLevelParameterfv(GLuint texture, GLint level,
|
||||
GLint iparam;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureLevelParameterfv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glGetTextureLevelParameterfv");
|
||||
if (!texObj)
|
||||
@@ -1717,13 +1668,6 @@ _mesa_GetTextureLevelParameteriv(GLuint texture, GLint level,
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureLevelParameteriv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glGetTextureLevelParameteriv");
|
||||
if (!texObj)
|
||||
@@ -2283,13 +2227,6 @@ _mesa_GetTextureParameterfv(GLuint texture, GLenum pname, GLfloat *params)
|
||||
struct gl_texture_object *obj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureParameterfv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = get_texobj_by_name(ctx, texture, GL_TRUE);
|
||||
if (!obj) {
|
||||
/* User passed a non-generated name. */
|
||||
@@ -2307,13 +2244,6 @@ _mesa_GetTextureParameteriv(GLuint texture, GLenum pname, GLint *params)
|
||||
struct gl_texture_object *obj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureParameteriv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = get_texobj_by_name(ctx, texture, GL_TRUE);
|
||||
if (!obj) {
|
||||
/* User passed a non-generated name. */
|
||||
@@ -2331,13 +2261,6 @@ _mesa_GetTextureParameterIiv(GLuint texture, GLenum pname, GLint *params)
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureParameterIiv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_TRUE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
@@ -2356,13 +2279,6 @@ _mesa_GetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint *params)
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureParameterIuiv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_TRUE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
|
@@ -507,13 +507,6 @@ texturestorage(GLuint dims, GLuint texture, GLsizei levels,
|
||||
_mesa_lookup_enum_by_nr(internalformat),
|
||||
width, height, depth);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureStorage%uD(GL_ARB_direct_state_access "
|
||||
"is not supported)", dims);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check the format to make sure it is sized. */
|
||||
if (!_mesa_is_legal_tex_storage_format(ctx, internalformat)) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
|
@@ -706,13 +706,6 @@ _mesa_TransformFeedbackBufferBase(GLuint xfb, GLuint index, GLuint buffer)
|
||||
struct gl_transform_feedback_object *obj;
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTransformFeedbackBufferBase(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = lookup_transform_feedback_object_err(ctx, xfb,
|
||||
"glTransformFeedbackBufferBase");
|
||||
if(!obj) {
|
||||
@@ -736,13 +729,6 @@ _mesa_TransformFeedbackBufferRange(GLuint xfb, GLuint index, GLuint buffer,
|
||||
struct gl_transform_feedback_object *obj;
|
||||
struct gl_buffer_object *bufObj;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTransformFeedbackBufferRange(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = lookup_transform_feedback_object_err(ctx, xfb,
|
||||
"glTransformFeedbackBufferRange");
|
||||
if(!obj) {
|
||||
@@ -1059,13 +1045,6 @@ _mesa_CreateTransformFeedbacks(GLsizei n, GLuint *names)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCreateTransformFeedbacks(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
create_transform_feedbacks(ctx, n, names, true);
|
||||
}
|
||||
|
||||
@@ -1236,13 +1215,6 @@ _mesa_GetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param)
|
||||
struct gl_transform_feedback_object *obj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTransformFeedbackiv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = lookup_transform_feedback_object_err(ctx, xfb,
|
||||
"glGetTransformFeedbackiv");
|
||||
if(!obj) {
|
||||
@@ -1269,13 +1241,6 @@ _mesa_GetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index,
|
||||
struct gl_transform_feedback_object *obj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTransformFeedbacki_v(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = lookup_transform_feedback_object_err(ctx, xfb,
|
||||
"glGetTransformFeedbacki_v");
|
||||
if(!obj) {
|
||||
@@ -1305,13 +1270,6 @@ _mesa_GetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index,
|
||||
struct gl_transform_feedback_object *obj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTransformFeedbacki64_v(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = lookup_transform_feedback_object_err(ctx, xfb,
|
||||
"glGetTransformFeedbacki64_v");
|
||||
if(!obj) {
|
||||
|
@@ -777,13 +777,6 @@ _mesa_EnableVertexArrayAttrib(GLuint vaobj, GLuint index)
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_vertex_array_object *vao;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glEnableVertexArrayAttrib(GL_ARB_direct_state_access "
|
||||
"is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
/* The ARB_direct_state_access specification says:
|
||||
*
|
||||
* "An INVALID_OPERATION error is generated by EnableVertexArrayAttrib
|
||||
@@ -837,13 +830,6 @@ _mesa_DisableVertexArrayAttrib(GLuint vaobj, GLuint index)
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_vertex_array_object *vao;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glDisableVertexArrayAttrib(GL_ARB_direct_state_access "
|
||||
"is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
/* The ARB_direct_state_access specification says:
|
||||
*
|
||||
* "An INVALID_OPERATION error is generated by EnableVertexArrayAttrib
|
||||
@@ -1108,13 +1094,6 @@ _mesa_GetVertexArrayIndexediv(GLuint vaobj, GLuint index,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_vertex_array_object *vao;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetVertexArrayIndexediv(GL_ARB_direct_state_access "
|
||||
"is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
/* The ARB_direct_state_access specification says:
|
||||
*
|
||||
* "An INVALID_OPERATION error is generated if <vaobj> is not
|
||||
@@ -1178,14 +1157,6 @@ _mesa_GetVertexArrayIndexed64iv(GLuint vaobj, GLuint index,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_vertex_array_object *vao;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetVertexArrayIndexed64iv(GL_ARB_direct_state_access "
|
||||
"is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* The ARB_direct_state_access specification says:
|
||||
*
|
||||
* "An INVALID_OPERATION error is generated if <vaobj> is not
|
||||
@@ -1774,13 +1745,6 @@ _mesa_VertexArrayVertexBuffer(GLuint vaobj, GLuint bindingIndex, GLuint buffer,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_vertex_array_object *vao;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glVertexArrayVertexBuffer(GL_ARB_direct_state_access "
|
||||
"is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
/* The ARB_direct_state_access specification says:
|
||||
*
|
||||
* "An INVALID_OPERATION error is generated by VertexArrayVertexBuffer
|
||||
@@ -1946,14 +1910,6 @@ _mesa_VertexArrayVertexBuffers(GLuint vaobj, GLuint first, GLsizei count,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_vertex_array_object *vao;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glVertexArrayVertexBuffers(GL_ARB_direct_state_access "
|
||||
"is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* The ARB_direct_state_access specification says:
|
||||
*
|
||||
* "An INVALID_OPERATION error is generated by VertexArrayVertexBuffer
|
||||
@@ -2062,12 +2018,6 @@ vertex_array_attrib_format(GLuint vaobj, GLuint attribIndex, GLint size,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_vertex_array_object *vao;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(GL_ARB_direct_state_access is not supported", func);
|
||||
return;
|
||||
}
|
||||
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
/* The ARB_direct_state_access spec says:
|
||||
@@ -2205,13 +2155,6 @@ _mesa_VertexArrayAttribBinding(GLuint vaobj, GLuint attribIndex, GLuint bindingI
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_vertex_array_object *vao;
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glVertexArrayAttribBinding(GL_ARB_direct_state_access "
|
||||
"is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
/* The ARB_direct_state_access specification says:
|
||||
*
|
||||
* "An INVALID_OPERATION error is generated by VertexArrayAttribBinding
|
||||
@@ -2286,13 +2229,6 @@ _mesa_VertexArrayBindingDivisor(GLuint vaobj, GLuint bindingIndex, GLuint diviso
|
||||
struct gl_vertex_array_object *vao;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glVertexArrayBindingDivisor(GL_ARB_direct_state_access "
|
||||
"is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
/* The ARB_direct_state_access specification says:
|
||||
*
|
||||
* "An INVALID_OPERATION error is generated by VertexArrayBindingDivisor
|
||||
|
@@ -207,7 +207,7 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab,
|
||||
SET_VertexAttribP4uiv(tab, vfmt->VertexAttribP4uiv);
|
||||
}
|
||||
|
||||
if (_mesa_is_desktop_gl(ctx)) {
|
||||
if (ctx->API == API_OPENGL_CORE) {
|
||||
SET_VertexAttribL1d(tab, vfmt->VertexAttribL1d);
|
||||
SET_VertexAttribL2d(tab, vfmt->VertexAttribL2d);
|
||||
SET_VertexAttribL3d(tab, vfmt->VertexAttribL3d);
|
||||
|
@@ -767,7 +767,8 @@ ptn_emit_instruction(struct ptn_compile *c, struct prog_instruction *prog_inst)
|
||||
|
||||
switch (op) {
|
||||
case OPCODE_RSQ:
|
||||
ptn_move_dest(b, dest, nir_frsq(b, ptn_channel(b, src[0], X)));
|
||||
ptn_move_dest(b, dest,
|
||||
nir_frsq(b, nir_fabs(b, ptn_channel(b, src[0], X))));
|
||||
break;
|
||||
|
||||
case OPCODE_RCP:
|
||||
@@ -926,10 +927,23 @@ ptn_add_output_stores(struct ptn_compile *c)
|
||||
foreach_list_typed(nir_variable, var, node, &b->shader->outputs) {
|
||||
nir_intrinsic_instr *store =
|
||||
nir_intrinsic_instr_create(b->shader, nir_intrinsic_store_var);
|
||||
store->num_components = 4;
|
||||
store->num_components = glsl_get_vector_elements(var->type);
|
||||
store->variables[0] =
|
||||
nir_deref_var_create(store, c->output_vars[var->data.location]);
|
||||
store->src[0].reg.reg = c->output_regs[var->data.location];
|
||||
|
||||
if (c->prog->Target == GL_FRAGMENT_PROGRAM_ARB &&
|
||||
var->data.location == FRAG_RESULT_DEPTH) {
|
||||
/* result.depth has this strange convention of being the .z component of
|
||||
* a vec4 with undefined .xyw components. We resolve it to a scalar, to
|
||||
* match GLSL's gl_FragDepth and the expectations of most backends.
|
||||
*/
|
||||
nir_alu_src alu_src = { NIR_SRC_INIT };
|
||||
alu_src.src = nir_src_for_reg(c->output_regs[FRAG_RESULT_DEPTH]);
|
||||
alu_src.swizzle[0] = SWIZZLE_Z;
|
||||
store->src[0] = nir_src_for_ssa(nir_fmov_alu(b, alu_src, 1));
|
||||
} else {
|
||||
store->src[0].reg.reg = c->output_regs[var->data.location];
|
||||
}
|
||||
nir_instr_insert_after_cf_list(c->build.cf_node_list, &store->instr);
|
||||
}
|
||||
}
|
||||
@@ -1022,7 +1036,10 @@ setup_registers_and_variables(struct ptn_compile *c)
|
||||
reg->num_components = 4;
|
||||
|
||||
nir_variable *var = rzalloc(shader, nir_variable);
|
||||
var->type = glsl_vec4_type();
|
||||
if (c->prog->Target == GL_FRAGMENT_PROGRAM_ARB && i == FRAG_RESULT_DEPTH)
|
||||
var->type = glsl_float_type();
|
||||
else
|
||||
var->type = glsl_vec4_type();
|
||||
var->data.mode = nir_var_shader_out;
|
||||
var->name = ralloc_asprintf(var, "out_%d", i);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user